These are the parameter definition optional information tags.
These tags are used in the ParamBlockDesc2
main
constructor as part of the <optional_tagged_param_specs>. The
typical format is:
<tag>, <optional_param_spec>,
The following options are available. The hyperlinks take you to the start of each tag description.
p_toolti
end
p_default
ParamType
of
the parameter (for example float for TYPE_FLOATs, int for
TYPE_INTs, Color(x,y,z) for TYPE_RGBA, Point3(x,y,z) for
TYPE_POINT3s, etc.) Defaults can only be supplied for the following
base types:TYPE_ANGLE, TYPE_PCNT_FRAC, TYPE_COLOR_CHANNEL,
TYPE_FLOAT, TYPE_TIMEVALUE, TYPE_INT, TYPE_BOOL,
TYPE_RADIOBTN_INDEX, TYPE_POINT3, TYPE_RGBA, TYPE_STRING,
TYPE_FILENAME, TYPE_MATRIX3
Examples:p_default,
FALSE,
p_default, 1,
p_default,
Point3(0,0,0),
p_default, 25.0,
p_ms_default
sphere.radius
defaults to 25.0 when created by the
scripter, but p_default
is set to 0.0 so interactive
creation starts out with a point-sized sphere when the first mouse
click is made.Example:p_ms_default, 25.0,
p_range
p_default
, above). Ranges can only be
supplied for the following types:TYPE_ANGLE, TYPE_PCNT_FRAC,
TYPE_COLOR_CHANNEL, TYPE_FLOAT, TYPE_TIMEVALUE, TYPE_INT,
TYPE_RADIOBTN_INDEX, TYPE_POINT3,
TYPE_RGBA
Example:p_range, -99999999.0,
99999999.0,
p_ui
EditSpinnerType
values described below:
EDITTYPE_INT
- Any integer value.EDITTYPE_FLOAT
- Any floating point value.EDITTYPE_UNIVERSE
- This is a value in world space
units. It respects the system's unit settings (for example feet and
inches).EDITTYPE_POS_INT
- Any integer >= 0EDITTYPE_POS_FLOAT
- Any floating point value
>= 0.0EDITTYPE_POS_UNIVERSE
- This is a positive value
in world space units. It respects the system's unit settings (for
example feet and inches) .EDITTYPE_TIME
- This is a time value. It respects
the system time settings (SMPTE for example). The list of dialog
item IDs depends on the ParamType of the parameter. For TYPE_POINT3
and TYPE_RGBA, you supply 3 pairs of IDs, one for each coordinate,
each pair specifying the editbox and spinner IDs. For the other you
specify one editbox/spinner pair of IDs. The display scale can be a
floating point value or the special value SPIN_AUTOSCALE. Eg:
p_ui, TYPE_SPINNER, EDITTYPE_UNIVERSE, IDC_RADIUS,
IDC_RADSPINNER, SPIN_AUTOSCALE,
If the parameter is a table
type then, as with all other control types, you must specify a
fixed table size and supply a list of dialog item IDs, one set for
each element in the tab. Eg, for a 3 element table: p_ui,
TYPE_SPINNER, EDITTYPE_UNIVERSE,
IDC_RADIUS1,
IDC_RADSPINNER1,
IDC_RADIUS2, IDC_RADSPINNER2,
IDC_RADIUS3, IDC_RADSPINNER3,
SPIN_AUTOSCALE,
This control type an be used with any
of the following ParamTypes: TYPE_ANGLE, TYPE_PCNT_FRAC,
TYPE_COLOR_CHANNEL, TYPE_FLOAT, TYPE_TIMEVALUE, TYPE_INT,
TYPE_POINT3, TYPE_RGBA
EditSpinnerType
values described below:
EDITTYPE_INT
- Any integer value.EDITTYPE_FLOAT
- Any floating point value.EDITTYPE_UNIVERSE
- This is a value in world space
units. It respects the system's unit settings (for example feet and
inches).EDITTYPE_POS_INT
- Any integer >= 0EDITTYPE_POS_FLOAT
- Any floating point value
>= 0.0EDITTYPE_POS_UNIVERSE
- This is a positive value
in world space units. It respects the system's unit settings (for
example feet and inches) .EDITTYPE_TIME
- This is a time value. It respects
the system time settings (SMPTE for example).p_ui, TYPE_SPINNER, EDITTYPE_UNIVERSE, IDC_EDITBOX,
IDC_SLIDER, numSegs
For Point3 you can do the following:
p_ui, TYPE_SPINNER, EDITTYPE_UNIVERSE, IDC_EDITBOX1,
IDC_SLIDER1,IDC_EDITBOX2, IDC_SLIDER2, IDC_EDITBOX3, IDC_SLIDER3,
numSegs
This control type an be used with any of the
following ParamTypes: TYPE_ANGLE, TYPE_PCNT_FRAC,
TYPE_COLOR_CHANNEL, TYPE_FLOAT, TYPE_TIMEVALUE, TYPE_INT,
TYPE_POINT3, TYPE_RGBA
TYPE_RADIO
, supply an int count of the
number of radiobuttons in this group and then a list of dialog item
IDs for each button. This can only be used with
TYPE_INT
parameters. The value of the parameter
defaults to the ordinal number of the radio button, starting at 0.
You can optionally supply a p_vals
tag immediately
following the TYPE_RADIO
, which should be followed by
a list of numbers, one for each radio button. These numbers will
become the (non-ordinal) parameter value corresponding to which
button is set.TYPE_SINGLECHEKBOX
documented below but is represented
by a button in either a pressed in or un-pressed state.TYPE_SINGLECHEKBOX
with the dialog item ID of the
checkbox. This can only be used with TYPE_INT
or
TYPE_BOOL
parameters.TYPE_COLORSWATCH
with the dialog item ID of the
swatch custom control. This can only be used with
TYPE_POINT3
or TYPE_RGBA
parameters.TYPE_EDITBOX
with the dialog item ID of the
EditBox custom control. This can only be used with
TYPE_STRING
and TYPE_FILENAMAE
parameters.p_validator
,
p_classID
and p_sclassID
). This can only
be used with TYPE_INODE
parameters. Use the
p_prompt
tag to supply a status line prompt.TYPE_TEXMAP
parameters. Use the
p_prompt
tag to supply a status line prompt.TYPE_MTL
parameters. Use the p_prompt
tag to supply a status
line prompt.TYPE_BITMAP
parameters. Use the p_prompt
tag to supply a status
line prompt.TYPE_TIMEVALUE_TAB, TYPE_INT,
TYPE_INT_TAB
For TYPE_FLOATLISTBOX: TYPE_ANGLE_TAB,
TYPE_PCNT_FRAC_TAB, TYPE_COLOR_CHANNEL_TAB, TYPE_FLOAT_TAB
.
The Add/Replace/Delete buttons automatically keep the Tab<>
parameter in step with the list. The TYPE_INT
parameter type and TYPE_INTLISTBOX
control type
combination is recognized specially and is used to allow a dropdown
list to be associated with an int parameter such that the selection
index in the dropdown becomes the integer parameter value. In this
mode, after the control type you supply the ListBox control ID,
then a count followed by that many string resource IDs. These
strings are used to populate the dropdown.Eg: p_ui,
TYPE_INTLISTBOX, <list_ctrl_id>, <num_items>, [
<item1_str_id>, <item2_str_id>, ... ]
These are
the list control res ID, followed by a list of initial string items
to load up given as a count (which can be 0 -- you can load them up
dynamically in the dialog proc), and then a list of string resource
IDs. See the std2_shader_type
parameter in
.CPP
for an example.TYPE_INT
and
TYPE_INT_TAB
. When used with parameters of type
TYPE_INT
, it needs to be followed by a series of
controls for displaying and managing a combo-box control, as shown
below: p_ui, TYPE_INT_COMBOBOX, <ctrl_id>,
<num_items>, [ <item1_str_id>, <item2_str_id>,
... ]
where: <ctrl_id>
: is the resource id
of the combo-box control <num_items>
: is the
number of items in the combo-box. If zero, no resource string ids
need to be provided <item1_str_id>,
<item2_str_id>, ...
: optional string resource ids for
the user visible names of the combo-box items.Example:
pb_int_combobox1, _T("TYPE_INT_COMBOBOX1"),
TYPE_INT, // parameter type
P_RESET_DEFAULT+P_ANIMATABLE, IDS_INT_COMBOBOX,
p_ui, TYPE_INT_COMBOBOX,
IDC_INT_COMBOBOX, //
resource id of combo box ui widget
4, // number of
items in the combobox
IDS_COMBOBOX_ITEM1,
IDS_COMBOBOX_ITEM2, IDS_COMBOBOX_ITEM3, IDS_COMBOBOX_ITEM4, //
string resource ids representing the "human readable" names of the
combobox items
p_vals, 10, 50, 30, 20,
p_default, 10,
p_tooltip,
IDS_INT_COMBOBOX,
end
When
TYPE_INT_COMBOBOX
is used with parameters of type
TYPE_INT_TAB
, it needs to be followed by a series of
controls for displaying and managing one combo-box control per tab
element, as in: p_ui, TYPE_INT_COMBOBOX,
<ctrl_id1>,<ctrl_id2>,... <ctrl_idn>,
<num_items>, [ <item1_str_id>, <item2_str_id>,
... ]
where: <ctrl_idn>
: resource ids of
the combo-box control, 1 <= n <= number of tab elements
<num_items>
: is the number of items in each
combo-box. If zero, no resource string ids need to be provided
<item1_str_id>, <item2_str_id>, ...
:
optional string resource ids for the user visible names of the
combo-box items.Example: pb_int_combobox2,
_T("TYPE_INT_COMBOBOX2"),
TYPE_INT_TAB, 2, //
parameter type and number of elements in the tab
P_RESET_DEFAULT+P_ANIMATABLE, IDS_LISTBOX,
p_ui,
TYPE_INT_COMBOBOX,
IDC_INT_COMBOBOX2_1,
IDC_INT_COMBOBOX2_2, // one combo-box resource id per tab
element
4, IDS_COMBOBOX_ITEM1, IDS_COMBOBOX_ITEM2,
IDS_COMBOBOX_ITEM3, IDS_COMBOBOX_ITEM4, // string resource ids
representing the "human readable" names of the combobox
items
p_vals, 10, 50, 30, 20,
p_default,
10,
p_tooltip, IDS_INT_COMBOBOX,
end
The p_vals
flag may follow a combo-box
ui specification: p_vals, <list_of_integers>
If
p_vals
is specified, the list of integer values that
follows represents the values associated with each combo-box item.
These values don't have to be consecutive or in order (increasing
or decreasing). See TYPE_RADIO.If p_vals
is not
following p_ui, TYPE_INT_COMBOBOX
, each combo-box item
is mapped to an integer value starting with zero and up to the
number of items in the combo-box.See examples above.p_uix
p_validator
PBValidator
. This class has a
Validate()
method which can return TRUE if the
PB2Value
passed to it is valid
and FALSE otherwise. This can be used for instance by a node pick
button to check if a choosen node is
acceptable.Example:p_validator,
&fOutValidator,
p_accessor
PBAccessor
. This class is used
to provide a parameter Get/SetValue callback. The callback can be
used to monitor parameter value changes, or to implement
dynamically-computed virtual parameters. The class has two virtual
methods, Get()
and Set()
, each given a
PB2Value&
, parameter ID,
etc. In the case of a Get()
you can modify the value
in the PB2Value&
to implement a
virtual get.Example:p_accessor,
&cmap_accessor,
p_vals
TYPE_RADIOp_ui.
This tag should be
followed by a list of numbers, one for each radio button. These
numbers will become the (non-ordinal) parameter value corresponding
to which button is set.Example:p_vals, 0,1,2,4,3
,
p_refno
P_OWNERS_REF
.
For these reftarg parameters this specifies the reference number in
the block's owner for this reference. If the parameter is a
Tab<>, then the reference number supplied is the base
reference number of the 0'th element, with sequential reference
numbers for the following elements.Example:p_refno,
UVGEN_REF,
p_subtexno
TYPE_TEXMAPBUTTON
ParamMap2 control types to give to
the Material Edtor for
automatic button and Drag And Drop
handling.Example:p_subtexno, 0,
p_submtlno
TYPE_MTLBUTTON
ParamMap2 control types to give to the
Material Edtor for
automatic button and Drag And Drop
handling.Example:p_submtlno, 1,
p_dim
ParamDimension*
as the argument. Certain
parameter types have an implied dimensions (see List of ParamType
Choices for details). Defaults to
defaultDim
.Example:p_dim,
stdWorldDim,
p_classID
TYPE_INODE
parameter and use a TYPE_PICKNODE
parammap control,
the picker uses this class ID in the picking filter. If you set
P_CAN_CONVERT
in the parameter's flag, it applies an
Object::CanConvertTo()
test to the node's world state
using the Class_ID
supplied to perform the filter test.p_sclassID
TYPE_INODE
parameter and use a
TYPE_PICKNODE
parammap control, the picker uses this
super class ID in the picking filter.Example:p_sclassID,
SHAPE_CLASS_ID,
p_enabled
p_enabled, FALSE,
p_enable_ctrls
p_enable_ctrls, 3,
sel_falloff, sel_pinch, sel_bubble,
p_prompt
p_prompt,
IDS_PICK_CAM_PROMPT,
p_caption
TYPE_FILEOPENBUTTON
or
TYPE_FILESAVEBUTTON
open/save file dialogs.p_init_file
pbdesc->GetParamDef(file_param).init_file =
new_file_name;
p_file_types
"<description1>|<pattern1>|<description2>|<pattern2>|...|"
In
other words, it is a sequence of file type descriptions and file
type patterns each separated by a '|' vertical bar and terminated
by a '|' vertical bar. For
example:"Data(*.dat)|*.dat|Excel(*.csv)|*.csv|All|*.*|"
specifies
3 types in the file type dropdown, the first reading "Data(*.dat)"
and matching *.dat and the second reading "Excel(*.csv)" and
matching *.csv and the third reading "All" and matching any
file.p_tooltip
p_tooltip
flag needs to be
followed by the resource id of the string representing the
tooltip.Example:p_tooltip, <tooltip_str_id>
end
Signals the end of the <required_param_specs> entry.