workspaceControl is undoable, queryable, and editable.
Creates and manages the widget used to host windows in a layout that enables docking and stacking windows together.
In query mode, return type is based on queried flag.
Long name (short name) |
Argument types |
Properties |
|
-actLikeMayaUIElement(-alm)
|
boolean
|
|
|
Controls whether or not this workspace control acts like Maya UI Elements such as the Shelf
and the Tool Box.
For example, this hides the tab bar and shows a toolbar grip on the end of the control to
allow undocking.
|
|
-checksPlugins(-cp)
|
boolean
|
|
|
Sets whether the UI (as defined by the uiScript) checks the loaded state of one or more plug-ins in its code.
The UI will not be loaded until the auto-loading of plug-ins is complete. Default value is false.
|
|
-close(-cl)
|
|
|
|
Closes the workspace control.
|
|
-closeCommand(-cc)
|
script
|
|
|
Command that gets executed when the workspace control is closed.
|
|
-collapse(-clp)
|
boolean
|
|
|
Collapse or expand the tab widget parent of the workspace control.
|
|
-defineTemplate(-dt)
|
string
|
|
|
Puts the command in a mode where any other flags and arguments are
parsed and added to the command template specified in the argument.
They will be used as default arguments in any subsequent
invocations of the command when templateName is set as the
current template.
|
|
-dockToControl(-dtc)
|
string string
|
|
|
Dock this workspace control next to the given control. The first argument is the control name,
the second is dock position relative to the control (valid values are: "left", "right", "top", "bottom").
|
|
-dockToMainWindow(-dtm)
|
string boolean
|
|
|
Dock this workspace control into the main window. The first argument is the dock position along the sides of
the main window (valid values are: "left", "right", "top", "bottom"), the second specifies whether the
control should be tabbed into the first control found at the dock position.
|
|
-dockToPanel(-dtp)
|
string string boolean
|
|
|
Dock this workspace control into the workspace docking panel that the given workspace control is in. The first argument
is the control name, the second is dock position along the sides of the panel (valid values are: "left", "right", "top",
"bottom"), the third specifies whether the control should be tabbed into the first control found at the dock position.
|
|
-duplicatable(-dup)
|
boolean
|
|
|
Controls whether or not this workspace control can be duplicated.
The default duplicate state is controlled by whether or not the panel is unique. Unique panels cannot be
duplicated or copied. Workspace controls without a panel also cannot be duplicated, unless specifically
set as such using this flag.
|
|
-exists(-ex)
|
|
|
|
Returns whether the
specified object exists or not. Other flags are ignored.
|
|
-floating(-fl)
|
boolean
|
|
|
Whether the workspace control is floating.
|
|
-height(-h)
|
|
|
|
Query only flag returning the current height of the control.
|
|
-heightProperty(-hp)
|
string
|
|
|
Set height property of the workspace control.
Valid values are:
- fixed - Cannot be resized manually and will not be given any extra space while maximizing/dynamically resizing
- preferred - Can be resized manually but will not be given any extra space while maximizing/dynamically resizing
- free - Can be resized manually and will be given extra space while maximizing/dynamically resizing
Default: free
In query mode returns the current height property of the workspace control.
|
|
-horizontal(-hr)
|
boolean
|
|
|
Orientation of the control. This flag is true by default, which corresponds to a horizontally oriented widget.
Note: currently only "Toolbox" and "Shelf" support a vertical orientation.
|
|
-initCallback(-ic)
|
string
|
|
|
Adds a mel command to be executed when the control is added to the layout.
The command should be a mel proc and it will be called with the workspaceControl name as parameter.
The mel command should take the form:
global proc callbackName(string $workspaceControlName)
If "save" is appended to the command name, it will be called during the layout save.
global proc callbackNameSave(string $workspaceControlName)
|
|
-initialHeight(-ih)
|
int
|
|
|
The initial height of the workspace control when first shown.
|
|
-initialWidth(-iw)
|
int
|
|
|
The initial width of the workspace control when first shown.
|
|
-label(-l)
|
string
|
|
|
The label text. The default label is the name of the workspace control.
|
|
-layoutDirectionCallback(-ldc)
|
string
|
|
|
Set a mel procedure to be called when the control changes orientation. The procedure is
called with argument 1 for horizontal and 0 for vertical.
|
|
-loadImmediately(-li)
|
boolean
|
|
|
Sets whether the UI (as defined by the uiScript) will be built immediately on workspace control
creation (true) or delayed until the control is actually shown (false). Default value is false.
|
|
-minimumHeight(-mh)
|
int
|
|
|
Sets the minimum height of control to the given value.
- If given value is 0 (False), minimum height is set to 0.
- If given value is 1 (True), minimum height is set to initial height.
- If given value is greater than 1, minimum height is set to the given value.
In query mode returns current minimum height of the control.
|
|
-minimumWidth(-mw)
|
int
|
|
|
Sets the minimum width of control to the given value.
This flag parameter was changed from bool to int in 2018 and old settings are still respected according to the following.
- If given value is 0 (False), minimum width is set to 0.
- If given value is 1 (True), minimum width is set to initial width.
- If given value is greater than 1, minimum width is set to the given value.
In query mode returns current minimum width of the control.
|
|
-raise(-r)
|
|
|
|
Raises a workspace control to the top and makes it active.
In Query mode, this flag will return whether the workspace control is active or not.
Note that this flag won't raise a control if is minimized or collapsed. Use the flag -rs/restore instead.
|
|
-requiredControl(-rc)
|
string
|
|
|
The name of a workspace control that needs to be open in order for this workspace control to properly function.
This workspace control will not be created if the required control is not open, and will be closed when the
required control is closed.
|
|
-requiredPlugin(-rp)
|
string
|
|
|
The name of a plug-in that needs to be loaded in order to build the workspace control UI.
|
|
-resizeHeight(-rsh)
|
int
|
|
|
Resizes a floating workspace control's height to the given value.
|
|
-resizeWidth(-rsw)
|
int
|
|
|
Resizes a floating workspace control's width to the given value.
|
|
-restore(-rs)
|
|
|
|
Restores the control according to the following rules:
- If collapsed then the control will be expanded
- If hidden then the control will be shown
- If minimized then the control will be restored
- If the control is an inactive tab into a tab group then it will become the active tab
|
|
-retain(-rt)
|
boolean
|
|
|
Sets whether the workspace control is retained (i.e. only hidden) or deleted when closed. Default value is true.
|
|
-stateString(-ss)
|
string
|
|
|
String containing the state of the control.
Can be used with the initCallback flag.
|
|
-tabPosition(-tp)
|
string boolean
|
|
|
Changes the tab position. The possible values are: "north", "east" and "west".
The boolean value, if set to true, changes the tab positions of all the controls in the parent widget.
If it is not set, only the current control will get its position changed.
A control can have a different orientation than the tab widget.
If the control tab position is different from the tab widget's one, the tab position will be changed when the control becomes the only control in the tab widget.
On query, only the control's tab position will be returned, not the tab widget's position. They may differ.
|
|
-tabToControl(-ttc)
|
string int
|
|
|
Tab this workspace control into the given control. The first argument is the control name,
the second is the index position within the containing tab widget (invalid values mean append).
|
|
-uiScript(-ui)
|
script
|
|
|
The specified script will be invoked to build the UI of the workspaceControl. This is a required flag.
|
|
-useTemplate(-ut)
|
string
|
|
|
Forces the command to use a command template other than
the current one.
|
|
-visible(-vis)
|
boolean
|
|
|
The visible state of the workspace control. A control is created visible by default.
If the control is created as not visible, the control will be created in a closed state.
To make it appear, edit the control to set the flags floating or the flag visible to true.
Use -r/raise flag to get the active status of a control as this flag will return true when the control
is minimized or collapsed.
|
|
-visibleChangeCommand(-vcc)
|
script
|
|
|
Command that gets executed when visible state of the workspace control changes.
|
|
-width(-w)
|
|
|
|
Query only flag returning the current width of the control.
|
|
-widthProperty(-wp)
|
string
|
|
|
Set width property of the workspace control.
Valid values are:
- fixed - Cannot be resized manually and will not be given any extra space while maximizing/dynamically resizing
- preferred - Can be resized manually but will not be given any extra space while maximizing/dynamically resizing
- free - Can be resized manually and will be given extra space while maximizing/dynamically resizing
Default: free
In query mode returns the current width property of the workspace control.
|
|