static ParamBlockDesc2 myBlockDescriptor(kMyBlockID, _T("My Block"), P_AUTO_CONSTRUCT + P_AUTO_UI, kMyPluginRefNum, // Parameters PB_RADIUS, _T("radius"), TYPE_FLOAT, P_ANIMATABLE, IDS_RADIUS, p_default, 0.0f, p_range, MIN_RADIUS, MAX_RADIUS, P_END );
static ParamBlockDesc2 myMaterialBlockDescriptor(kMyMaterialBlockID, _T("My Material Block"), P_AUTO_CONSTRUCT + P_AUTO_UI, kMyPluginRefNum, // Parameters PB_DIFFUSE_COLOR, _T("diffuseColor"), TYPE_RGBA_COLOR, P_ANIMATABLE, IDS_DIFFUSE_COLOR, p_default, Color(1.0f, 1.0f, 1.0f), P_END );This code creates a ParamBlockDesc2 instance that defines a "My Material Block" parameter block for a Maya plugin. It contains a single parameter, "diffuseColor", which is of type RGBA color and animatable. It has a default value of white (1.0, 1.0, 1.0).