void FloatLimitControlDlg::Update() { if (mCtrl) { TimeValue t = GetCOREInterface()->GetTime(); IParamBlock2* floatPBlock = mCtrl->GetParamBlockByID(FloatLimitCtrl::float_limitctrl_params); if (mUpperLimitSpin) { mUpperLimitSpin->SetValue( mDim->Convert(mCtrl->GetUpperLimit(t)), FALSE); if (floatPBlock) mUpperLimitSpin->SetKeyBrackets(floatPBlock->KeyFrameAtTimeByID(FloatLimitCtrl::pb_upper_limit, t)); } if (mLowerLimitSpin) { mLowerLimitSpin->SetValue( mDim->Convert(mCtrl->GetLowerLimit(t)), FALSE); if (floatPBlock) mLowerLimitSpin->SetKeyBrackets(floatPBlock->KeyFrameAtTimeByID(FloatLimitCtrl::pb_lower_limit, t)); } if (mUpperWidthSpin) { mUpperWidthSpin->SetValue( mDim->Convert(mCtrl->GetUpperWidth(t)), FALSE); if (floatPBlock) mUpperWidthSpin->SetKeyBrackets(floatPBlock->KeyFrameAtTimeByID(FloatLimitCtrl::pb_upper_smoothing, t)); mUpperWidthSpin->Enable(mCtrl->IsEnabled() && mCtrl->IsUpperLimitActive()); } if (mLowerWidthSpin) { mLowerWidthSpin->SetValue( mDim->Convert(mCtrl->GetLowerWidth(t)), FALSE); if (floatPBlock) mLowerWidthSpin->SetKeyBrackets(floatPBlock->KeyFrameAtTimeByID(FloatLimitCtrl::pb_lower_smoothing, t)); mLowerWidthSpin->Enable(mCtrl->IsEnabled() && mCtrl->IsLowerLimitActive()); } CheckDlgButton(mHWnd, IDC_LIMITCTRL_ENABLE, mCtrl->IsEnabled()); CheckDlgButton(mHWnd, IDC_LIMITCTRL_UPPERLIMITCHECK, mCtrl->IsUpperLimitActive()); CheckDlgButton(mHWnd, IDC_LIMITCTRL_LOWERLIMITCHECK, mCtrl->IsLowerLimitActive()); EnableWindow(GetDlgItem(mHWnd, IDC_LIMITCTRL_UPPERLIMITCHECK), mCtrl->IsEnabled()); EnableWindow(GetDlgItem(mHWnd, IDC_LIMITCTRL_UPPERLIMIT), mCtrl->IsEnabled() && mCtrl->IsUpperLimitActive()); EnableWindow(GetDlgItem(mHWnd, IDC_LIMITCTRL_UPPERLIMITSPIN), mCtrl->IsEnabled() && mCtrl->IsUpperLimitActive()); EnableWindow(GetDlgItem(mHWnd, IDC_LIMITCTRL_LOWERLIMITCHECK), mCtrl->IsEnabled()); EnableWindow(GetDlgItem(mHWnd, IDC_LIMITCTRL_LOWERLIMIT), mCtrl->IsEnabled() && mCtrl->IsLowerLimitActive()); EnableWindow(GetDlgItem(mHWnd, IDC_LIMITCTRL_LOWERLIMITSPIN), mCtrl->IsEnabled() && mCtrl->IsLowerLimitActive()); } }
BOOL KeyAtTimeByID(ParamID id,TimeValue t) { return pblock->KeyFrameAtTimeByID(id,t); }