The following methods are used to get or set the active command panel:
setCommandPanelTaskMode [mode:]<panel_name>
Sets the specified command panel as active. The valid panel_name
values are:
#create -- Create Panel
#modify -- Modify Panel
#hierarchy -- Hierarchy Panel
#motion -- Motion Panel
#display -- Display Panel
#utility -- Utility Panel
The syntax of SetCommandPanelTaskMode
was modified in 3ds Max 7 so that the panel name to switch to can either be specified as the mode keyword argument, or simply as the argument to the method.
The following expressions are equivalent:
setCommandPanelTaskMode #modify
setCommandPanelTaskMode mode:#modify
getCommandPanelTaskMode()
Returns the current command panel as a name value. The name values correspond to the panel_name
values for SetCommandPanelTaskMode()
.
suspendEditing which:<panel_name>
alwaysSuspend:<boolean>
resumeEditing which:<panel_name>
alwaysSuspend:<boolean>
Suspend/resume rollout display in the command panels. The panel_name
values are as described for the setCommandPanelTaskMode
command.
If which
: is not specified, all panels are suspended or resumed.
If alwaysSuspend
: is true (default is true), the panel is suspended even if the panel is not selected when the command is run.
Only Modify, Hierarchy, and Motion panels support suspend/resume.
If the steps between the SuspendEditing and the ResumeEditing can throw an exception, the steps should be performed in a try/catch so that the editing state can be properly restored.
The following 3ds Max system global variables are associated with the command panel:
cui.commandPanelOpen
Lets you get and set whether the command panel is displayed. A Boolean value - true
if the command panel is displayed, false
if not displayed.
Specific methods and 3ds Max global variables are associated with the Create and Modify panels. These methods and global variables are described in the following topics: