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:
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).
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
Rollout User-Interface Items Common Properties
Rollout User-Interface Items Common Layout Parameters
Rollout User-Interface Control Types