3ds Max C++ API Reference
List of ControlType Choices

Enumerations

enum  ControlType {
  TYPE_SPINNER , TYPE_RADIO , TYPE_SINGLECHECKBOX , TYPE_SINGLECHEKBOX = TYPE_SINGLECHECKBOX ,
  TYPE_MULTICHECKBOX , TYPE_MULTICHEKBOX = TYPE_MULTICHECKBOX , TYPE_COLORSWATCH
}
 Used to associate automatically-generated UI controls with parameters in a ParamBlockDesc2. More...
 
enum  ControlType2 {
  TYPE_EDITBOX = TYPE_COLORSWATCH + 1 , TYPE_CHECKBUTTON , TYPE_PICKNODEBUTTON , TYPE_TEXMAPBUTTON ,
  TYPE_MTLBUTTON , TYPE_BITMAPBUTTON , TYPE_FILEOPENBUTTON , TYPE_FILESAVEBUTTON ,
  TYPE_INTLISTBOX , TYPE_FLOATLISTBOX , TYPE_STRINGLISTBOX , TYPE_NODELISTBOX ,
  TYPE_SLIDER , TYPE_BUTTON , TYPE_POINT3LISTBOX , TYPE_SHADERSUBPARAMETERBLOCK ,
  TYPE_POINT4LISTBOX , TYPE_COLORSWATCH_FRGBA , TYPE_INT_COMBOBOX , TYPE_POINT2LISTBOX ,
  TYPE_FLOAT_EDITABLE_COMBOBOX
}
 Used to associated automatically generated UI controls with parameters in a ParamBlockDesc2. More...
 

Detailed Description

Enumeration Type Documentation

◆ ControlType

Used to associate automatically-generated UI controls with parameters in a ParamBlockDesc2.

See also
ControlType2, ParamBlockDesc2 ~{ used by some customized operation mode. UI Control of zoom in direction used in customized zoom mode. }~
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

Spinner and Slider Control Types

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.

459  {
477  TYPE_SPINNER,
478 
486  TYPE_RADIO,
487 
492  TYPE_SINGLECHEKBOX = TYPE_SINGLECHECKBOX, // For fix of legacy issue with misspelling
493 
496  TYPE_MULTICHEKBOX = TYPE_MULTICHECKBOX, // For fix of legacy issue with misspelling
497 
503  };
@ TYPE_RADIO
Identifies a radio button control.
Definition: paramtype.h:486
@ TYPE_SINGLECHECKBOX
Identifies a single checkbox control with a parameter.
Definition: paramtype.h:491
@ TYPE_SPINNER
Identifies a spinner control.
Definition: paramtype.h:477
@ TYPE_COLORSWATCH
Identifies a color swatch color control.
Definition: paramtype.h:502
@ TYPE_SINGLECHEKBOX
Definition: paramtype.h:492
@ TYPE_MULTICHECKBOX
Identifies a multiple checkbox control.
Definition: paramtype.h:495
@ TYPE_MULTICHEKBOX
Definition: paramtype.h:496

◆ ControlType2

Used to associated automatically generated UI controls with parameters in a ParamBlockDesc2.

Wherever ControlType2 is used, a ControlType can be used as well.

See also
ControlType, ParamBlockDesc2, ~{ used by some customized operation mode. UI Control of zoom in direction used in customized zoom mode. }~
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.

See also
~{ List Box Control of zoom in direction used in customized zoom mode. }~.
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.

sa List Box Control Types.

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.


It requires a type, list of dialog item resource IDs and a number of ticks. The slider type should be one of the EditSpinnerType values.

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.

See also
mrShaderParamMap2
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.

See also
~{ Combo Box Control of zoom in direction used in customized zoom mode. }~. 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 here:
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.

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 
511 {
515 
520 
527 
533 
539 
545 
551 
557 
580 
587 
597 
607 
610  TYPE_SLIDER,
611 
613  TYPE_BUTTON,
614 
623 
629 
632 
639 
684 
693 
694  //The float editable combobox contains a combobox and a editbox.
695  //The Editbox will show the related float value for each combobox item.
696  //The float combobox has an item named "custom".
697  //If the "custom" is selected, the user can input a arbitrary value in the Editbox(This control also has a min and a max value).
698  //If the current selected item is not "custom", the combobox will go to the "custom" item when the user input a value into the Editbox which is not related to any item.
699  //The example for adding it to the ParamBlockDesc2 is below:
700  // //// dlgIds[0] is the id of COMBOBOX, dlgIds[1] is the id of editBox
701  // pbd->AddParam(mUiId++, uiElement->GetParameterName(), TYPE_FLOAT, P_COMPUTED_NAME, 0,
702  // p_default, value,
703  // p_range, min, max,
704  // p_ui, mapID, TYPE_FLOAT_EDITABLE_COMBOBOX, dlgIds[0], dlgIds[1], 0,
705  // p_accessor, &s_proteinParamAccessor,
706  // end
707  // );
709 
710 };
@ TYPE_POINT2LISTBOX
Identifies a series of controls for displaying and managing a list box control containing a Tab<Point...
Definition: paramtype.h:692
@ TYPE_BUTTON
Definition: paramtype.h:613
@ TYPE_SHADERSUBPARAMETERBLOCK
Parameters with a UI type of TYPE_SHADERSUBPARAMETERBLOCK indicate PB2 parameters for which param map...
Definition: paramtype.h:628
@ TYPE_STRINGLISTBOX
Identifies a series of controls for displaying and managing a list box control containing a Tab<MSTR>...
Definition: paramtype.h:596
@ TYPE_FILEOPENBUTTON
Identifies a file open dialog button.
Definition: paramtype.h:550
@ TYPE_FLOATLISTBOX
Identifies a list box control for managing a Tab<float>.
Definition: paramtype.h:586
@ TYPE_TEXMAPBUTTON
A texture map selector button that supports drag and drop of texture maps.
Definition: paramtype.h:532
@ TYPE_MTLBUTTON
Identifies a material selector button that supports drag and drop of materials.
Definition: paramtype.h:538
@ TYPE_CHECKBUTTON
Idenfies a two-state (pressed or not-pressed) check button control.
Definition: paramtype.h:519
@ TYPE_COLORSWATCH_FRGBA
Identifies a color swatch color control for colors with an alpha channel.
Definition: paramtype.h:638
@ TYPE_PICKNODEBUTTON
Identifies a scene node (INode) picker button.
Definition: paramtype.h:526
@ TYPE_POINT4LISTBOX
Identifies a series a controls for displaying and managing a list box control containing a Tab<Point4...
Definition: paramtype.h:631
@ TYPE_INTLISTBOX
Identifies a list box control for managing a Tab<int>.
Definition: paramtype.h:579
@ TYPE_SLIDER
Identifies a standard 3ds Max slider control.
Definition: paramtype.h:610
@ TYPE_FILESAVEBUTTON
Identifies a file save dialog button.
Definition: paramtype.h:556
@ TYPE_FLOAT_EDITABLE_COMBOBOX
Definition: paramtype.h:708
@ TYPE_EDITBOX
Identifies a 3ds Max custom edit box control.
Definition: paramtype.h:514
@ TYPE_NODELISTBOX
Identifies a series of controls for displaying and managing a list box control containing a Tab<INode...
Definition: paramtype.h:606
@ TYPE_BITMAPBUTTON
Identifies a bitmap browser button.
Definition: paramtype.h:544
@ TYPE_POINT3LISTBOX
Identifies a series of controls for displaying and managing a list box control containing a Tab<Point...
Definition: paramtype.h:622
@ TYPE_INT_COMBOBOX
A combo box control that can be used with parameters of type TYPE_INT and TYPE_INT_TAB.
Definition: paramtype.h:683