Overview: Parameter Blocks
 
 
 

The 3ds Max parameter block system is a mechanism used by 3ds Max to manage parameters used by a plug-in (e.g. a bend modifier's angle parameter, or a sphere's radius parameter).

3ds Max uses the parameter block system to:

  1. Expose a UI element to the user either automatically or manually
  2. Notify the plug-in of changes to parameters using the reference system.
  3. Serialize plug-in data (specifically the data stored in parameters associated with a parameter block)
  4. Expose plug-in data to MAXScript.

Parameter blocks are represented using the class IParamBlock2, and are constructed from a parameter block descriptor class (ParamBlockDesc2).

Parameter Blocks are Reference Targets

It is key point to realize that a parameter block is a reference target, and that a plug-in which manages a parameter block is supposed to derive from ReferenceMaker and must properly override ReferenceMaker::GetReference() and ReferenceMaker::SetReference() to handle IParamBlock2 objects as reference targets.

This will allow the plug-in to be notified (i.e. 3ds Max will call the plug-in's implementation of ReferenceMaker::NotifyRefChanged()) whenever a change occurs on the parameter (e.g. when the user manipulates the associated UI element, or another plug-in updates the parameter, or when it is changed through MAXScript).

For more information see the topic Exposing and Managing References.