User Interface Controls > Common Properties > Layout > Types > Pickbutton |
A pickbutton control is used to place a scene object-picker button on the rollout. It operates like a normal pick button in the 3ds Max user interface, turning light-green when pressed and causing an object-pick mode to be entered. The user can then choose a scene object by clicking on it. The pick mode exits and the button returns to its unpressed state. The user can right-click to cancel the pick mode.
pickbutton <name> [<caption>] [message:<string>] [filter:<function>] [toolTip:<string>] [autoDisplay:<boolean>]
The default alignment of pickbutton items is #center .
Note that the filter function will not let you select any other objects except Boxes.
The optional text to be displayed in the 3ds Max status line while in the pick mode. Default is no message.
The optional filter function that will be called to test the eligibility of the scene object under the cursor for picking. It must be a function of one argument, which will be the object under test, and return true if the object is eligible or false if not.
EXAMPLE: |
The following filter function allows only objects whose names begin with "foo" to be pickable: |
Provides text for a tooltip for the button. No tooltip if unsupplied.
When set to true , the name of the picked object will be automatically displayed as the text on the button. If false or not specified, the button caption will not be changed.
The last object picked using the pickbutton , undefined if no object has been picked. The property can be both get and set, accepting a node or undefined.
Get/set the tooltip string of the checkbutton.
Available in 3ds Max 9 and higher.
Called when the user selects an object in the scene while in the pickbutton pick mode. The <arg> argument will contain the selected object. The handler is not called if the user cancels out of the pick mode.
Called when the right mouse button is released over the button. Available in 3ds Max 8 and higher.