3ds Max C++ API Reference
|
enum ControlType |
Used to associate automatically-generated UI controls with parameters in a ParamBlockDesc2.
Enumerator | |
---|---|
TYPE_SPINNER | Identifies a spinner control. The spinner control is used to provide input of values limited to a fixed numeric type. For example, the control may be limited to the input of only positive integers. The input options are integer, float, universe (world space units), positive integer, positive float, positive universe, and time. This control allows the user to increment or decrement a value by clicking on the up or down arrows. The user may also click and drag on the arrows to interactively adjust the value. The Ctrl key may be held to accelerate the value changing speed, while the Alt key may be held to decrease the value changing speed. The value can be one of the EditSpinnerType enum values. 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 others 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 can 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 | Identifies a radio button control. Radio buttons are used to provide the user with a single boolean choice, or when used in groups, to select among several options. These are the standard Win32 radio button controls. Following the TYPE_RADIO, you must supply an integer count of the number of radio buttons in this group and then a list of dialog item IDs for each button. A radio button can be used with TYPE_INT or TYPE_RADIOBTN_INDEX 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 p_ui section, which would 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_SINGLECHECKBOX | Identifies a single checkbox control with a parameter. Check boxes are used to provide the user with a single boolean choice. This is the standard Win32 check box control. The TYPE_SINGLECHECKBOX must be followed dialog item ID. A TYPE_SINGLECHECKBOX can only be used with TYPE_INT or TYPE_BOOL parameters. |
TYPE_SINGLECHEKBOX | |
TYPE_MULTICHECKBOX | Identifies a multiple checkbox control. This control type is not currently supported. |
TYPE_MULTICHEKBOX | |
TYPE_COLORSWATCH | Identifies a color swatch color control. The color swatch control presents the user with the standard 3ds Max modeless color selector when the user clicks on the control. The color swatch control displays the currently selected color. The TYPE_COLORSWATCH with the dialog item ID of the swatch custom control. This can only be used with TYPE_POINT3 or TYPE_RGBA parameter. |
enum ControlType2 |
Used to associated automatically generated UI controls with parameters in a ParamBlockDesc2.
Wherever ControlType2 is used, a ControlType can be used as well.
Enumerator | |
---|---|
TYPE_EDITBOX | Identifies a 3ds Max custom edit box control. The TYPE_EDITBOX must be followed by the dialog item ID of the edit box custom control. This can only be used with TYPE_STRING and TYPE_FILENAME parameters. |
TYPE_CHECKBUTTON | Idenfies a two-state (pressed or not-pressed) check button control. Check boxes are used to provide the user with a single boolean choice. This is the standard Win32 check box control. The TYPE_SINGLECHECKBOX must be followed by a dialog item ID. A TYPE_SINGLECHECKBOX can only be used with TYPE_INT or TYPE_BOOL parameters. |
TYPE_PICKNODEBUTTON | Identifies a scene node (INode) picker button. This is a 3ds Max ICustButton control used in a CBT_CHECK mode. Follow the control type with the dialog item ID of the button control. When the user presses this button a PickModeCallback command mode is entered and the user can pick a scene node under the filtering of any validation supplied (see tags 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_TEXMAPBUTTON | A texture map selector button that supports drag and drop of texture maps. This is an ICustButton control used in CBT_PUSH mode. The control type must be followed by the dialog item ID of the button control. This button opens up a map selector dialog when pressed. This can only be used with TYPE_TEXMAP parameters. Use the p_prompt tag to supply a status line prompt. |
TYPE_MTLBUTTON | Identifies a material selector button that supports drag and drop of materials. This is an ICustButton control used in CBT_PUSH mode. The control type must be followed by the dialog item ID of the button control. This button displays a material selector dialog when pressed. This can only be used with TYPE_MTL parameters. Use the p_prompt tag to supply a status line prompt. |
TYPE_BITMAPBUTTON | Identifies a bitmap browser button. This is a 3ds Max CustButton control used in a CBT_PUSH mode. Follow the control type with the dialog item ID of the CustButton custom control. This button displays a standard 3ds Max Bitmap browser when pressed and is Bitmap drag-and-drop sensitive. Can only be used with TYPE_BITMAP parameters. Use the p_prompt tag to supply a status line prompt. |
TYPE_FILEOPENBUTTON | Identifies a file open dialog button. This is an ICustButton control used in CBT_PUSH mode. The control type with the dialog item ID of the button control. This button open a standard Windows Open File dialog for selecting a file name. This type can only be used with TYPE_STRING and TYPE_FILENAME parameters. Use any of the p_caption, p_init_file, and p_file_types tags to further control the dialog. |
TYPE_FILESAVEBUTTON | Identifies a file save dialog button. This is an ICustButton control used in CBT_PUSH mode. The control type with the dialog item ID of the button control. This button open a standard Windows Save File dialog for selecting a file name. This type can only be used with TYPE_STRING and TYPE_FILENAME parameters. Use any of the p_caption, p_init_file, and p_file_types tags to further control the dialog. |
TYPE_INTLISTBOX | Identifies a list box control for managing a Tab<int>. The setup consists of a ListBox control, 3 buttons for adding, replacing and deleting items in the list and a 3ds Max spinner to supply source values for Add & Replace. After the control type, you supply 4 dialog item IDs. The first is the ListBox control, then dialog item IDs for 3 CustButton controls for an Add, Replace and Delete button, respectively. Follow these with a spinner type, editbox/spinner dialog item ID pair and a display scale, exactly as for TYPE_SPINNER. You can supply the value 0 for any of the Add, Replace, or Delete buttons if you don't need them in the dialog. This can only be used with the following parameter types: TYPE_TIMEVALUE_TAB, TYPE_INT, TYPE_INT_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 \maxsdk\samples\materials\stdmtl2.cpp for an example.
|
TYPE_FLOATLISTBOX | Identifies a list box control for managing a Tab<float>. The setup is identical to TYPE_INTLISTBOX. This can only be used with the following parameter types: TYPE_ANGLE_TAB, TYPE_PCNT_FRAC_TAB, TYPE_COLOR_CHANNEL_TAB, TYPE_FLOAT_TAB. |
TYPE_STRINGLISTBOX | Identifies a series of controls for displaying and managing a list box control containing a Tab<MSTR> parameter. The setup consists of a ListBox control, 3 buttons for adding, replacing and deleting items in the list and a 3ds Max CustEdit box to supply source strings for Add & Replace. After the control type, you supply 4 dialog item IDs. The first is the ListBox control, then dialog item IDs for 3 CustButton controls for an Add, Replace and Delete button, respectively. Follow these with the CustEdit control dialog item ID. You can supply the value 0 for any of the Add, Replace, Delete buttons or CustEdit control IDs if you don't need them in the dialog. Can only be used with TYPE_STRING_TAB parameters. The Add/Replace/Delete buttons automatically keep the Tab<> parameter in step with the list. |
TYPE_NODELISTBOX | Identifies a series of controls for displaying and managing a list box control containing a Tab<INode> parameter. The setup consists of a ListBox control, 3 buttons for picking, replacing and deleting items in the list. After the control type, you supply 4 dialog item IDs. The first is the ListBox control, then dialog item IDs for 3 CustButton controls for a Pick, Replace and Delete button, respectively. THe Pick and Replace buttons act exactly as TYPE_PICKNODEBUTTONS to get nodes to add-to or replace-in the list. You can supply the value 0 for any of the Add, Replace, Delete buttons IDs if you don't need them in the dialog. Can only use with TYPE_INODE_TAB parameters. The Pick/Replace/Delete buttons automatically keep the Tab<> parameter in step with the list, including managing References as needed. |
TYPE_SLIDER | Identifies a standard 3ds Max slider control.
|
TYPE_BUTTON | |
TYPE_POINT3LISTBOX | Identifies a series of controls for displaying and managing a list box control containing a Tab<Point3> parameter. The setup consists of a ListBox control, 3 buttons for adding, replacing and deleting items in the list, a source spinner type, three pairs of editboxes and spinners, and a display scale. After the control type, you supply 4 dialog item IDs. The first is the ListBox control, then dialog item IDs for 3 CustButton controls for an Add, Replace and Delete button, respectively. Follow this with the source spinner type, the editbox and spinner for the first item, the editbox and spinner for the second item, the editbox and spinner for the third item, and finally the display scale. Note that you can only use this with TYPE_POINT3_TAB parameters. |
TYPE_SHADERSUBPARAMETERBLOCK | Parameters with a UI type of TYPE_SHADERSUBPARAMETERBLOCK indicate PB2 parameters for which param maps must be created, while all parameters should be edited in the same rollup.
|
TYPE_POINT4LISTBOX | Identifies a series a controls for displaying and managing a list box control containing a Tab<Point4> parameter. |
TYPE_COLORSWATCH_FRGBA | Identifies a color swatch color control for colors with an alpha channel. The color swatch control presents the user with the standard 3ds Max modeless color selector when the user clicks on the control. The color swatch control displays the currently selected color. The TYPE_COLORSWATCH with the dialog item ID of the swatch custom control. This can only be used with TYPE_POINT4 or TYPE_FRGBA parameter. |
TYPE_INT_COMBOBOX | A combo box control that can be used with parameters of type TYPE_INT and TYPE_INT_TAB.
where:
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:
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. |
TYPE_POINT2LISTBOX | Identifies a series of controls for displaying and managing a list box control containing a Tab<Point4> parameter. The setup consists of a ListBox control, 3 buttons for adding, replacing and deleting items in the list, a source spinner type, three pairs of editboxes and spinners, and a display scale. After the control type, you supply 4 dialog item IDs. The first is the ListBox control, then dialog item IDs for 3 CustButton controls for an Add, Replace and Delete button, respectively. Follow this with the source spinner type, the editbox and spinner for the first item, the editbox and spinner for the second item, and finally the display scale. Note that you can only use this with TYPE_POINT2_TAB parameters. |
TYPE_FLOAT_EDITABLE_COMBOBOX |
|
strong |
The ColorContext describes in what context a color or texture value is meant to be used.
Depending on the context, a color value may be interpreted and displayed differently, based on the current color-management settings.
To be used in ParamBlockDesc2, following a p_colorContext tag. Only valid for TYPE_RGBA, TYPE_FRGBA and TYPE_TEXMAP.
Example:
Enumerator | |
---|---|
COLOR_SPACE_CONTEXT_NONE | The context of this color/texture is unspecified. This is the default used by plugins have not been opted in yet to support proper color context. |
COLOR_SPACE_CONTEXT_SCENE_SURFACE | The context of this color/texture is to be used in the scene defining the color of a surface. The rules of energy conservation will be applied, what will effectively limit the linear RGB values to be in the range of 0.0 to 1.0. |
COLOR_SPACE_CONTEXT_SCENE_LIGHT | The context of this color/texture is to be used in the scene defining the color of a light. No energy conservation rules will be applied, any given values for RGB may be valid. |
COLOR_SPACE_CONTEXT_DATA | The context of this color/texture is to be used as pure data, for things like normals, absorption coefficients, etc. |
COLOR_SPACE_CONTEXT_SRGB | The context of this color/texture is the to be used in the UI - defined in sRGB (IEC 61966-2-1). There is no additional conversion happening beside the implicit sRGB to monitor ICM conversion of the operating system. |
COLOR_SPACE_CONTEXT_UI |