class MyPlugin : public Animatable { public: // constructor MyPlugin() { // create parameter block pblock = new ParamBlockDesc2(...); } // on parameter change void OnParamChange(int paramID) { pblock->InvalidateUI(); // ... do other stuff } private: // parameter block IParamBlock2* pblock; };
IParamBlock2* pblock = ...; // get parameter block int paramID = ...; // get parameter ID pblock->SetValue(paramID, ...); // set parameter value pblock->InvalidateUI(); // invalidate user interfaceIn this example, the SetValue method is used to set a parameter value and then the InvalidateUI method is used to invalidate the user interface of the plugin. Overall, the cpp ParamBlockDesc2 InvalidateUI method is used to invalidate the user interface of a plugin when a parameter value changes, which is a useful feature for ensuring that the user interface always displays accurate information. This method is found in the Autodesk 3ds Max SDK package library.