Class ParamBlockDesc2
See Also: Class ClassDesc2, Class ParamMap2UserDlg, Class Mtl, Class Texmap, Class PBBitmap, Class PBAccessor, Class INode, Class Color, Class Point3, Class ReferenceTarget, Structure ParamDef, List of ParamType Choice, List of ParamTags Choices.
class ParamBlockDesc2 : public BaseInterfaceServer
Description:
This class is available in release 3.0 and later only.
In the Parameter Block2 scheme there is one ParamBlockDesc2 object per entire Parameter Block2.
This class is used when adding a paramblock descriptor for each parameter block2. This is usually done in the form of a static instance of this class. The constructor takes a number of fixed, block-related arguments and then a varargs-based variable list of arguments that define the block and its parameters.
All methods of this class are implemented by the System.
Method / Specification Groups:
The hyperlinks below take you to the start of groups of related methods or constructor vararg specifications within the class:
Data Members:
public:
ParamDef* paramdefs;
Array of parameter definitions.
ClassDesc2* cd;
This is the class descriptor of the class which owns this parameter block descriptor.
TCHAR* int_name;
This is the internal name of this parameter descriptor. This name is not localized. Internal names are meant to be parsable as identifiers. As such they should begin with an alpha character, have only alphanumerics, and have no spaces, punctuations, etc. The convention for multi-word names is to use studly-caps, eg, paintRadius.
int local_name;
This is the string table resource ID for the localized (sub-anim) name.
BlockID ID;
The permanent parameter block ID.
USHORT count;
The number of parameters in block.
ULONG version;
This is the parameter block version.
BYTE flags;
One or more of the following values (see the constructor argument flags below for details):
P_CLASS_PARAMS
P_AUTO_CONSTRUCT
P_AUTO_UI
P_USE_PARAMS
P_INCLUDE_PARAMS
P_SCRIPTED_CLASS
P_TEMPORARY
P_HASCATEGORY
P_CALLSETS_ON_LOAD
P_TEMPLATE_UI
Note: The following data members are optional and used by the auto-construct code:
int ref_no;
The reference number for the auto-constructed parameter block.
int dlg_template;
The rollout dialog template resource.
int title;
String table resource ID of the rollout title.
int test_flags;
The ClassDesc2::Begin/EndEditParams() test flags. See the flag_mask parameter description below for details.
int rollup_flags;
This is used to control rollup creation. See the rollup_flags parameter description below for details.
ParamMap2UserDlgProc* dlgProc;
Points to the parameter map user dialog proc (if used).
MSPluginClass* pc;
If this ParamBlockDesc2 belongs to a scripted plug-in this points to the scripted class (or NULL otherwise). See MAXScript SDK.
Value* rollout;
If this ParamBlockDesc2 belongs to a scripted plug-in this points to rollout name. See MAXScript SDK.
IParamBlock2* class_params;
Pointer to class parameter block if the CLASS_PARAM flag is specified for the block. See the flags descriptions below for details.
Prototype:
void AddParam(ParamID id, ...);
Remarks:
This method is used for building descriptors incrementally. It adds a parameter to an existing descriptor.
Note that you must not modify a descriptor with this function once it has been used to construct a ParamBlock2 (for instance in object creation); there is no version control in place and crashes or unpredictable results can occur.
Parameters:
ParamID id, ...
This function takes a single parameter definition in exactly the same varargs format as the ParamBlockDesc2 constructor. See Constructors.
Prototype:
void ReplaceParam(ParamID id, ...);
Remarks:
This method is used for modifying a descriptors incrementally. It overrides an existing parameter definition of same ID passed. Note: You must not modify a descriptor with this method once it has been used to construct a ParamBlock2.
Parameters:
ParamID id, ...
This function takes a single parameter definition in exactly the same varargs format as the ParamBlockDesc2 constructor. See Constructors.
Prototype:
void DeleteParam(ParamID id);
Remarks:
Deletes the specified parameter from the descriptor.
Parameters:
ParamID id
The permanent ID of the parameter to delete.
Prototype:
void ParamOption(ParamID id, int option_tag, ...);
Remarks:
This method is used for modifying a descriptor incrementally. It alters a parameter definition optional information tag of an existing descriptor. Note: You must not modify a descriptor with this method once it has been used to construct a ParamBlock2.
Parameters:
ParamID id
The permanent ID of the parameter.
int option_tag, ...
This method takes a single tagged option in the same varargs format as the tagged parameter options in the ParamBlockDesc2 constructor. See <optional_tagged_param_specs>
Prototype:
void SetClassDesc(ClassDesc2* cd);
Remarks:
This method sets the ClassDesc2 pointer maintained by this class. You can only call this method once on a descriptor and then only if it has been constructed initially with a NULL cd. See the notes in the constructor.
Parameters:
ClassDesc2* cd
Points to the ClassDesc to set.
Prototype:
ParamBlockDesc2(BlockID ID, TCHAR* int_name, int local_name, ClassDesc2* cd, BYTE flags, ...);
Remarks:
This constructor takes a number of fixed, block-related arguments and then a varargs-based variable list of arguments that define the block and its parameters.
The format of the definitions in this shown below, but basically is in the form of a sequence of fixed specs followed by a variable number of tagged optional specs for each parameter.
Parameters:
The generic form for the parameters of this constructor is shown below:
ParamBlockDesc2(<required_block_specs>, [<auto_construct_block_refno>,]
{<optional_tagged_param_specs>,}
end
,}
end);
That is:
1. Required block specs & per-block flags, followed by,
2. Optional owning object reference number for the block if auto-construct, followed by,
3. Optional parameter map specs if auto-ui, followed by,
4. Zero or more parameter specs, comprising:
a. Required parameter specs, followed by,
b. Zero or more optional parameter specs, each with is own leading tag,
the list terminated by an 'end' tag, followed by,
5. an 'end' tag
The following required first arguments to the constructor form the "required_block_spec" and "per block flags":
BlockID ID
The permanent block ID for the parameter block2.
TCHAR* int_name
The internal name string. This name is not localized. Internal names are meant to be parsable as identifiers. As such they should begin with an alpha character, have only alphanumerics, and have no spaces, punctuations, etc. The convention for multi-word names is to use studly-caps, eg, paintRadius.
int local_name
The resource ID of the localized (sub-anim) name string.
ClassDesc2* cd
Points to the class descriptor2 of the owning class. This is used to add this descriptor to the ClassDesc2's table of block descriptors for the class. Note: This value may be passed as NULL for situations where the blocks owning ClassDesc2 is not available for static initializations (such as in a separate file). Before using the descriptor for any block construction, the ClassDesc2* must be initialized with the method:
void ParamBlockDesc2::SetClassDesc(ClassDesc2* cd);
You can only call this method once on a descriptor and then only if it has been constructed initially with a NULL cd.
BYTE flags
Per block/descriptor flags. One or more of the following values (they may be added together as in P_AUTO_CONSTRUCT + P_AUTO_UI).
P_CLASS_PARAMS
Indicates this block holds class-level parameters which are attached to the ClassDesc2 for the plug-in. Such class level parameters are shared by each instance of the class. The block is automatically allocated by and stored in the descriptor. You get at its parameters via GetValue()/SetValue() calls on the descriptor.
P_AUTO_CONSTRUCT
Indicates the parameter block2 will be constructed and referenced automatically to its owner in the call to ClassDesc2::MakeAutoParamBlocks(). If this flag is set, the parameter block's reference number in the owning object should be given immediately following the flag word in the descriptor constructor. See <auto_construct_block_refno>.
P_AUTO_UI
Indicates this block supports automatic UI rollout management in calls to ClassDesc2::BeginEditParams(), ClassDesc2::EndEditParams(),ClassDesc2::CreateParamDlg(), ClassDesc2::CreateParamDialog(), etc.
If set, the <auto_ui_parammap_specs> must be supplied in the descriptor constructor.
P_HASCATEGORY
This parameter is available in release 4.0 and later only.
The category field that can be used to order rollups (see Class IRollupWindow) to various Parameter Map creation methods. In order to use the category field with AutoUI, this flag has to be declared together with P_AUTO_UI in the ParamBlockDesc2. An additional int, that describes the category has to be appended to the parameter list after the ParamMap2UserDlgProc* proc parameter. The same thing is true for multimaps. The P_HASCATEGORY field can only be declared for the whole pblock. That means, that every multimap has to have the category parameter. To use the standard value ROLLUP_CAT_STANDARD can be used. In the example below 4900 is used as the integer describing the category;
static ParamBlockDesc2 std2_shader_blk ( std2_shader,
_T("shaderParameters"), 0, &stdmtl2CD,
P_AUTO_CONSTRUCT + P_AUTO_UI + P_HASCATEGORY, SHADER_PB_REF,
//rollout
IDD_DMTL_SHADER4, IDS_KE_SHADER, 0, 0, &shaderDlgProc, 4900,
// params
std2_shader_type, _T("shaderType"), TYPE_INT, 0, IDS_JW_SHADERTYPE,
P_USE_PARAMS
Indicates that this block shares (exactly) the paramdefs from another descriptor. This is used to specify an already established ParamBlockDesc2 instance whose parameters you wish to share. This effectively gives the referring descriptor a pointer to the established descriptors 'paramdefs' array. In this case no other parameters definition can be supplied to referencing descriptors constructor. See the sample code below.
P_INCLUDE_PARAMS
Indicates that this block loads in a copy the paramdefs from another descriptor. This is used to take a copy of an already established descriptor's parameters, to which you can add extra parameter definitions in the referencing descriptors constructor. This provides a kind of poor-man's factoring of common parameters, but note it is a copy; any subsequent changes to the establised descriptor's parameter definitions are not reflected in the referencing descriptor.
You give the pointer to the ParamBlockDesc2 supplying the existing parameter definitions following the other optional block-level parameters: following the flag word is the block's reference number if P_AUTO_CONSTRUCT is specified, then the rollout dialog template info if P_AUTO_UI is specified, then the pointer to the sourcing descriptor if P_USE_PARAMS or P_INCLUDE_PARAMS is specified. For example:
static ParamBlockDesc2 metal2_param_blk ( shdr_params, _T("shaderParameters"), 0, &metalCD, P_AUTO_CONSTRUCT + P_USE_PARAMS,
// pblock refno
0,
// use params from existing descriptor
&const_param_blk
);
P_SCRIPTED_CLASS
This is for internal use only. It means that the descriptor was defined on the fly as a side-effect of writing a scripted plug-in.
P_TEMPORARY
This is for internal use only.
P_TEMPLATE_UI
This indicates that dialog templates will be provided or constructed.
P_CALLSETS_ON_LOAD
Signals that this block should have CallSets() called on it during post-load processing on scene loads & merges. This effectively ensures that all PBAccessor::Set() methods will be called after the flagged pblock2 is fully loaded, so that they can track loaded param values, for example. This allows a single point of param value tracking in the PBAccessor::Set() and precludes the need for individual objects to implement PLCBs to do this tracking themselves.
P_MULTIMAP
This flag is available in release 4.0 and later only.
Indicates that the block being described will have more than one rollup/map. If you specify this flag, the constructor interprets the rollup template and parameter definitions arguments in a modified syntax. Here's a sample rework of the main pblock in GeoSphere into two rollups:
enum { geo_map_1, geo_map_2 }; // enum IDs for the 2 parammaps
static ParamBlockDesc2 geo_param_blk ( geo_params, _T("GeosphereParameters"), 0, &gsphereDesc, P_AUTO_CONSTRUCT +
P_AUTO_UI + P_MULTIMAP, PBLOCK_REF_NO,
// map rollups
2,
geo_map_1, IDD_GSPHERE_1, IDS_PARAMETERS_1, 0, 0, NULL,
geo_map_2, IDD_GSPHERE_2, IDS_PARAMETERS_2, 0, 0, NULL,
// params
geo_hemi, _T("hemisphere"), TYPE_BOOL, P_ANIMATABLE, IDS_HEMI,
p_default, FALSE,
p_ui, geo_map_2, TYPE_SINGLECHEKBOX, IDC_HEMI,
end,
geo_segs, _T("segs"), TYPE_INT, P_ANIMATABLE, IDS_RB_SEGS,
p_default, 4,
p_range, MIN_SEGMENTS, MAX_SEGMENTS,
p_ui, geo_map_1, TYPE_SPINNER, EDITTYPE_INT,
IDC_SEGMENTS, IDC_SEGSPINNER, 0.05f,
end,
geo_radius, _T("radius"), TYPE_FLOAT, P_ANIMATABLE + P_RESET_DEFAULT, IDS_RB_RADIUS,
p_default, 0.0,
p_ms_default, 25.0,
p_range, MIN_RADIUS, MAX_RADIUS,
p_ui, geo_map_1, TYPE_SPINNER, EDITTYPE_UNIVERSE,
IDC_RADIUS, IDC_RADSPINNER, 1.0,
p_uix, geo_map_2,
end,
...
First, there is an enum to provide IDs for the two maps in the main block, geo_map_1 and geo_map_2. The P_MULTIMAP flag is added to the block flags in the main descriptor constructor arguments to indicate multiple pmaps present. If P_AUTO_UI is specified, the usual single rollup template spec is replaced by a count (of rollups) followed by that many sets of rolup specs, each beginning with the associated mapID. The auto UI mechanism will add the rollups in the order given in this list.
In the parameter definition section, the only change is to the p_ui option, which now requires a map ID before the rest of the UI specification to say which rollup/map the spec relates to. In this case, we've put the hemisphere checkbox in the 2nd rollup and the segs and radius spinners in the first.
There is also a new option, p_uix, which is used to say that the parameter is to appear in more than one rollup. In this case, the radius spinner also shows up in the 2nd rollup, geo_map_2. When you do this, all the controls that connect to this parameter are ganged together; they all change when any one of them changes and all show keyframe highlights and so on. The current limitations on this are that the type of UI control and its various dialog template item IDs must be the same in each rollup in which it appears.
If P_AUTO_CONSTRUCT is specified in the required per block / descriptor flags (BYTE flags above) then the integer reference number of the parameter block2 in the plug-in needs to be specified:
int ref_no
This is the same number that the plug-in would use to get and set the parameter block referrence in GetReference() and SetReference().
If P_AUTO_UI is specified in the required per block / descriptor flags (BYTE flags above) then the following arguments to the constructor are required:
int dialog_template_ID, int dialog_title_res_ID, int flag_mask, int rollup_flags, ParamMap2UserDlgProc* proc
Each of these is described below:
int dialog_template_ID
The ID of the dialog template (eg IDD_something).
int dialog_title_res_ID
The string table resource ID for the title of the dialog.
int flag_mask
This is used by ClassDesc2::BeginEditParams() and ClassDesc2::EndEditParams() to determine whether the ParamMap2 shold be created/deleted on this call. All the bits in the supplied mask must be on in the Begin/EndEditParams flag longword for the action to take place.
int rollup_flags
This flag is used to control rollup creation. You may pass:
APPENDROLL_CLOSED
to have the rollup added in the closed (rolled up) state. Otherwise pass 0.
ParamMap2UserDlgProc* proc
If there are controls in the dialog that require special processing this user dialog proc can be implemented to process them. See Class ParamMap2UserDlgProc. If not used then NULL should be passed.
The required parameter spec is formatted as shown below. There is one of these for each of the controls managed by the parameter map. They are followed by an <optional_tagged_param_spec>.
ParamID id, TCHAR* internal_name, ParamType type, [int table_size,] int flags, int local_name_res_ID,
Each of these is described below:
ParamID id
The permanent, position-independent ID for the parameter.
TCHAR* internal_name
The internal name for the parameter.
ParamType type
The type of parameter. See List of ParamType Choices.
[int table_size]
If the type is one of the Tab<> types, you need to supply an initial table size which can be 0.
int flags
The per parameter flag bits. This should be a bitwise OR of one or more of the following:
P_ANIMATABLE
Indicates the parameter is animatable.
P_TRANSIENT
Indicates the parameter should not be saved in the scene file. One might do this, for example, for virtual parameters that don't actually hold data but reflect data held elsewhere in the object (and accessed via a PBAccessor) which is saved explicitly by it. This might save file space. In some cases, parameters might be provided that are derived from other state in the object that is computed each time you load the object and made available say as a help to script authors. In these cases also, you might decide not to take up file space.
P_NO_INIT
This is obsolete.
P_COMPUTED_NAME
Indicates to call a compute name function to get a dynamically-computed name. This allows a plug-in to provide a dynamically-created local name for a parameter or Tab<> parameter entry. If you specify this parameter flag, you also need to suppy a p_accessor PBAccessor instance pointer that has the GetLocalName() method implemented.
P_COMPUTED_DIM
Indicates to call a compute dimension function to get a dynamically-computed dimension. See the optional_tagged_param_spec p_dim.
P_RESET_DEFAULT
Indicates to not make creation parameters sticky, rather always reset to default values.
P_SUBANIM
Indicates this is a non-animatable reference target parameter to be published as a sub-anim (which makes it visible in Track View)
P_TV_SHOW_ALL
This is used for Tab<> animatables, and indicates to show all entries in Track View even if no controller assigned.
P_NO_REF
For reference target parameters, this indicates to not maintain the reference automatically (rather simply keep a copy of the pointer).
P_OWNERS_REF
Indicates this is a reference target parameter owned by the parameter block's owner not the block itself. Make sure to supply the owner's reference number in a p_refno specification. If neither P_REF_NO or P_OWNERS_REF is set, the parameter block owns and maintains the reference.
P_SUBTEX
Indicates a texmap parameter is kept by the owner using the MtlBase::xSubTexmap methods. Provide the integer index of the sub-texmap using the param tag p_subtexno.
You would use this flag in materials or texmaps that contain other texmaps as parameters, in which these 'sub' maps are not stored in the ParamBlock2 and are not accessible as direct references on the parent map or material, but are accessible via the MtlBase::GetSubTexmap()/SetSubTexmap() protocol.
Specifying this P_SUBTEX flag signals this situation and looks for a p_subtexno parameter option to give the sub-texmap number for the map. For example, the Standard material stores all its maps in a separate structure that appears as a single reference in the Standard material. In this case, the individual texmaps are not direct references on the material, but are accessible on the material via GetSubTexmap()/SetSubTexmap().
Note that P_OWNERS_REF and P_SUBTEX are both primarly intended for use when re-coding existing plug-ins in which the sub-maps are already managed by the owner in some way. If you are implementing a new plug-in, you should just let the ParamBlock2 host them for you and then you don't have to bother with either of these flags.
P_CAN_CONVERT
Indicates the p_classID validator is used in a CanConvertoTo() call, rather than as exact classID match.
P_VARIABLE_SIZE
Indicates a Tab<> parameter is variable in size. This allows scripted changes.
P_NO_AUTO_LABELS
Disables the automatic setting of button text for texmaps, materials, files, etc. You can use the method IParamMap2::SetText() to set it by hand.
P_SHORT_LABELS
This is for use with TYPE_TEXMAP, TYPE_MTL and TYPE_BITMAP parameters that are associated with ParamMap2 picker buttons. If you specify this flag, a shortened form of the object name is installed in the picker button label. For texmaps and materials, the MtlBase::GetName() rather than MtlBase::GetFullName() is used, and for bitmaps just the filename rather than the full pathname is used.
int local_name_res_ID
The localized name for the parameter. This is a ID for the resource in the string table.
There may be zero or more optional tagged parameter specs, each with its own leading tag, with the entire list terminated by an 'end' tag. This list of tagged arguments has the following form:
<tag>, <optional_param_spec>,
For the possible tags and the specification arguments see List of ParamTags Choices.
Methods:
public:
Prototype:
USHORT Count();
Remarks:
Returns the number of parameters in the block.
Prototype:
DWORD Version();
Remarks:
Returns the version of the parameter block.
Prototype:
int IDtoIndex(ParamID id);
Remarks:
Returns the index into the parameter definition array of the parameter whose ID passed.
Parameters:
ParamID id
The permanent parameter ID.
Prototype:
ParamID IndextoID(int i);
Remarks:
Returns the permanent parameter ID of the parameter whose index is passed.
Parameters:
int i
The zero based index of the parameter in the paramdefs array.
Prototype:
ParamDef& GetParamDef(ParamID id);
Remarks:
This method is used for accessing a parameter's ParamDef structure.
Parameters:
ParamID id
The permanent ID of the parameter.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, float v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the floating point value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
float v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, int v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the integer value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
int v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, Point3& v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the Point3 value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
Point3& v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, Color& v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the Color value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
Color& v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, TCHAR* v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the string value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
TCHAR* v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, Mtl* v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the Mtl* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
Mtl*v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, Texmap* v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the Texmap* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
Texmap* v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, PBBitmap* v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the PBBitmap* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
PBBitmap* v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, INode* v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the INode* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
INode* v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, ReferenceTarget* v, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Sets the ReferenceTarget* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
ReferenceTarget*v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL SetValue(ParamID id, TimeValue t, Matrix3& v, int tabIndex=0);
Remarks:
This method is available in release 4.0 and later only.
This method is used with static class parameter blocks only.
Sets the Matrix3 value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to set the value.
Matrix3& v
The value to set.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to set.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, float& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the floating point value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
float& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, int& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the integer value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
int& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, Point3& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the Point3 value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
Point3& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, Color& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the Color value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
Color& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, TCHAR*& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the string value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
TCHAR*& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, Mtl*& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the Mtl* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
Mtl*& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, Texmap*& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the Texmap* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
Texmap*& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, PBBitmap*& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the PBBitmap* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
PBBitmap*& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, INode*& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the INode* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
INode*& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, ReferenceTarget*& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the ReferenceTarget* value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
ReferenceTarget*& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
BOOL GetValue(ParamID id, TimeValue t, Matrix3& v, Interval &ivalid, int tabIndex=0);
Remarks:
This method is available in release 4.0 and later only.
This method is used with static class parameter blocks only.
Retrieves the Matrix3 value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t
The time at which to get the value.
Matrix3& v
The value to retrieve is returned here.
Interval &ivalid
This is the validity interval which is updated by the validity of the retrieved parameter.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
TRUE on success; otherwise FALSE.
Prototype:
Color GetColor(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the Color value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The Color value of the parameter.
Prototype:
Point3 GetPoint3(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Retrieves the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The Point3 value of the parameter
Prototype:
int GetInt(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The integer value of the parameter.
Prototype:
float GetFloat(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The floating point value of the parameter.
Prototype:
TimeValue GetTimeValue(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The TimeValue value of the parameter.
Prototype:
TCHAR* GetStr(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The TimeValue value of the parameter.
Prototype:
Mtl* GetMtl(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
A pointer to the Mtl object.
Prototype:
Texmap* GetTexmap(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
A pointer to the Texmap.
Prototype:
PBBitmap* GetBitmap(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
A pointer to the PBBitmap object.
Prototype:
INode* GetINode(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
A pointer to the INode.
Prototype:
ReferenceTarget* GetReferenceTarget(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is used with static class parameter blocks only.
Returns the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
A pointer to the ReferenceTarget.
Prototype:
Matrix3 GetMatrix3(ParamID id, TimeValue t=0, int tabIndex=0);
Remarks:
This method is available in release 4.0 and later only.
This method is used with static class parameter blocks only.
Retrieves the value of the specified parameter at the specified time.
Parameters:
ParamID id
The permanent ID of the parameter.
TimeValue t=0
The time at which to get the value.
int tabIndex=0
If the parameter is a Tab<> this is the zero based index into the table of the value to get.
Return Value:
The Matrix3 value of the parameter
Prototype:
TCHAR* GetString(int id);
Remarks:
Returns a string resource from plug-in module's resource.
Parameters:
int id
The permanent ID of the parameter.
Prototype:
void InvalidateUI();
Remarks:
This method invalidates any current parameter map2 user interface currently open for this descriptor.
Prototype:
void InvalidateUI(ParamID id, int tabIndex=-1);
Remarks:
This method invalidates the control whose parameter ID is specified.
Parameters:
ParamID id
The permanent ID of the parameter.
int tabIndex=-1
If the parameter is a Tab<> this is the zero based index of parameter whose associated control is to be redrawn.
Prototype:
void SetUserDlgProc(ParamMap2UserDlgProc* proc=NULL);
Remarks:
This method allows for special handling for a set of controls. The developer provides a dialog proc object to process the message from the controls. This method is used to tell the parameter map that the developer defined method should be called. The given proc will be called after default processing is done. Note that if the proc is non-NULL when the ParamMap is deleted its DeleteThis() method will be called.
Note, in version 4.0 and later, this actually maps to a call on the explicit map ID overload of SetUserDlgProc() with default map ID of 0.
Parameters:
ParamMap2UserDlgProc* proc=NULL
A pointer to the user dialog proc object to process the control.
Prototype:
void SetUserDlgProc(MapID map_id, ParamMap2UserDlgProc* proc=NULL);
Remarks:
This method is available in release 4.0 and later only.
This overload of SetUserDlgProc() has a new parameter, map_id, that specifies the ID of the parameter map/rollup to set the user dialog proc for. See original function for the rest of the description.
Prototype:
ParamMap2UserDlgProc* GetUserDlgProc(MapID map_id = 0);
Remarks:
Returns the user dialog proc for the parameter map associated with this descriptor.
Parameters:
MapID map_id
This parameter is available in release 4.0 and later only.
Specifies the ID of the map/rollout to get the user dialog proc for.
Prototype:
void SetOwnerRefNo(ParamID id, int refno);
Remarks:
This method allows dynamic setting of the P_OWNERS_REF reference number for given Reference Target parameter.
Parameters:
ParamID id
The permanent ID for the parameter.
int refno
The reference number to set.
Prototype:
int GetOwnerRefNo(ParamID id);
Remarks:
This method returns the P_OWNERS_REF reference number for given Reference Target parameter.
Parameters:
ParamID id
The permanent ID for the parameter.
Prototype:
void SetSubTexNo(ParamID id, int texno);
Remarks:
Sets the sub-texture number for the specified texmap parameter. You can use this to dynamically change a parameter's sub object number.
Parameters:
ParamID id
The parameter ID for the texmap.
int texno
The sub-texture number to set.
Prototype:
void SetSubMtlNo(ParamID id, int mtlno);
Remarks:
Sets the sub-material number for the specified texmap parameter. You can use this to dynamically change a parameter's sub object number.
Parameters:
ParamID id
The parameter ID for the material.
int mtlno
The sub-material number to set.
Prototype:
int GetSubTexNo(ParamID id);
Remarks:
Returns the sub-texture number for the specified parameter.
Parameters:
ParamID id
The ID of the parameter.
Prototype:
int GetSubMtlNo(ParamID id);
Remarks:
Returns the sub-material number for the specified parameter.
Parameters:
ParamID id
The ID of the parameter.
Prototype:
void SetInitFile(ParamID id, TCHAR* s);
Remarks:
This method allows dynamic setting of the TYPE_OPEN/SAVEFILEBUTTON p_init_file field.
Parameters:
ParamID id
The permanent ID for the parameter.
TCHAR* s
The string to set.
Prototype:
TCHAR* GetInitFile(ParamID id);
Remarks:
This method returns the TYPE_OPEN/SAVEFILEBUTTON p_init_file field.
Parameters:
ParamID id
The permanent ID for the parameter.