User Interface Controls > Common Properties > Layout > Types > Materialbutton |
A Materialbutton control is used to place a button in the rollout that will display the 3ds Max Material/Map Browser dialog when clicked. Only materials will be displayed in the Material/Map Browser dialog.
materialbutton <name> [<caption>] [material:<material>] [images:<image_spec_array>] [toolTip:<string>] [border:<boolean>] [iconName:<filename> iconSize:<point3>]
The default alignment of materialbutton items is #center .
The initial material value returned by the material property before the user has selected a material using the materialbutton . Defaults to undefined .
An image-specification array for providing bitmap images for the materialbutton . If this is specified, the <label> is ignored and the contents of the materialbutton are replaced with the bitmaps.
images:#(<image>, <maskImage>, <count_integer>, \ <enabled_out_image_index>, <enabled_in_image_index>, \ <disabled_out_image_index>, <disabled_in_image_index>)
where <image> and <maskImage> can be either a bitmap file name string or a MAXScript bitmap value. <count_integer> specifies the number of sub-images in the bitmaps, and the image_index values specify which sub-image in the bitmaps is to be used for each of the four materialbutton states.
FOR EXAMPLE: |
would use a rendering as the materialbutton image, and |
would use sub-images 1 and 4 of bitmaps dcybtns.bmp and dcymask.bmp for the out and in states of the materialbutton , respectively. See also Image Buttons. |
Provides text for a tooltip for the materialbutton . No tooltip if unsupplied.
When set to true or not specified, the materialbutton will be drawn with a border. This was the default behavior prior to 3ds Max 2009.
When set to false, the materialbutton will be drawn without a border, making it one with the UI background. If the materialbutton is enabled, the border will appear when the materialbutton is pressed, or upon mouseover.
Available in 3ds Max 2009 and higher.
iconName:
The filename of an icon to use as an image on the button. If iconName is specified, the caption is ignored. The iconSize specifies the iconName size at 100% DPI scaling. If not specified, the default [24,24] is assumed.
iconSize:
The size of the icon specified by iconName at 100% DPI scaling.
The current material value for the materialbutton , or the material value specified by the material parameter if the user has not yet selected a material.
Sets the image-specification array for the materialbutton .
Get/set the tooltip string of the checkbutton.
Available in 3ds Max 9 and higher.
Called when the user selects a material from the Material/Map Browser dialog while in the materialbutton pick command mode. The <arg> argument will contain the selected material value. The handler is not called if the user cancels out of the Material/Map Browser dialog.
Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.