A colorpicker item is used to place a 3ds Max color selection swatch on the rollout. The user can click the swatch to display a Color Selector dialog or drag colors to or from it. The syntax is:
colorpicker <name> [ <caption> ] [color:<color>] [alpha:<boolean>] [fieldWidth:<number>] [height:<number>] [modal:<boolean>] [title:<string>]
The default alignment of colorpicker items is #left.
rollout change_wirecolor "Object Color Changer"
colorpicker theColor "Wireframe color:" color:[0,0,255] modal:false
on theColor changed new_col do selection.wirecolor = new_col
In this example, the color picker is set to non-modal, which means that changing the color value will change the wireframe color of all selected objects instantly and interactively. Setting modal to true would let the user adjust the color without feedback in the viewports and assign the result using the OK button.
Initial color of the swatch. Defaults to blue.
The title displayed on the Color Selector dialog. Defaults to "Choose a color".
The width in pixels of the swatch. Defaults to 40.
The height in pixels of the swatch. Defaults to 16.
By default, the color picker is declared as modal which prevents key strokes from being passed to 3ds Max. When the keyword argument "modal" is set to false, the color picker will enable the shortcuts.
When set to true, clicking the color swatch brings up the color picker with alpha support. Defaults to false. If the color swatch is tied to an #acolor of #point4 parameter, this parameter is automatically set to true. Available in 3ds Max 6 and higher.
The current swatch color.
When set to true, clicking the color swatch brings up the color picker with alpha support. (Previously available in 3ds Max 6 as construction parameter only).
on <colorpicker> changed <arg> do <expr>
Called when the user selects a new color in the open Color Selector dialog for this swatch or drops a new color on it. The <arg> argument contains the new color.
Rollout User-Interface Items Common Properties
Rollout User-Interface Items Common Layout Parameters
Rollout User-Interface Control Types