Go to: Synopsis. Return value. Flags. Python examples.
workspaceLayoutManager(
[name]
, [collapseMainWindowControls=[string, boolean]], [current=boolean], [delete=string], [i=string], [listLayouts=boolean], [listModuleLayouts=boolean], [listUserLayouts=boolean], [modified=string], [parentWorkspaceControl=string], [reset=boolean], [restoreMainWindowControls=boolean], [save=boolean], [saveAs=string], [setCurrent=string], [setCurrentCallback=string], [setModifiedCallback=string], [type=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
workspaceLayoutManager is undoable, queryable, and editable.
The Workspace Layout Manager loads and saves the layout of the various toolbars and windows in the user interface.
This command allows listing and managing their properties.
string[] | depending on arguments |
In query mode, return type is based on queried flag.
collapseMainWindowControls, current, delete, i, listLayouts, listModuleLayouts, listUserLayouts, modified, parentWorkspaceControl, reset, restoreMainWindowControls, save, saveAs, setCurrent, setCurrentCallback, setModifiedCallback, type
Long name (short name) |
Argument types |
Properties |
|
collapseMainWindowControls(cmw)
|
[string, boolean]
|
|
|
Saves main window layout and collapses all other controls in main window except the given one (first parameter)
if it does not have any size constraint. Second parameter specifies if main window UI elements should be hidden or not.
|
|
current(cu)
|
boolean
|
|
|
Get the name of the current layout.
|
|
delete(d)
|
string
|
|
|
Delete the given workspace. The string is the name of the layout, not the file name.
|
|
i(i)
|
string
|
|
|
Import the given workspace file to the workspaces directory. The string is an absolute path.
|
|
listLayouts(ll)
|
boolean
|
|
|
List the names of all registered layouts.
|
|
listModuleLayouts(lml)
|
boolean
|
|
|
List the names of module layouts.
|
|
listUserLayouts(lul)
|
boolean
|
|
|
List the names of user layouts.
|
|
modified(m)
|
string
|
|
|
Check whether or not the specified layout has been modified.
|
|
parentWorkspaceControl(pwc)
|
string
|
|
|
Returns the parent workspace control of the given UI (panel) or an empty string if it does not exist.
|
|
reset(rs)
|
boolean
|
|
|
Reset the current workspace to its original layout. Factory layouts will be reverted to default while user layouts will be reloaded from disk.
|
|
restoreMainWindowControls(rmw)
|
boolean
|
|
|
Restores the main window layout to the one saved with the -cmw/-collapseMainWindowControls flag.
The loaded workspace file will be deleted once it is restored.
|
|
save(s)
|
boolean
|
|
|
saveAs(sa)
|
string
|
|
|
Save the current layout under the specified name.
|
|
setCurrent(sc)
|
string
|
|
|
Load the given workspace. The string is the name of the layout, not the file name.
|
|
setCurrentCallback(scc)
|
string
|
|
|
MEL only. The string is interpreted as a MEL callback, which is called
each time a layout is set as current (with -setCurrent flag).
The callback is of the form:
global proc MySetCurrentCallback(string $layoutName)
|
|
setModifiedCallback(smc)
|
string
|
|
|
MEL only. The string is interpreted as a MEL callback, which is called
each time a layout is modified or restored, that is, each time the -modified flag value changes.
The callback is of the form:
global proc MySetModifiedCallback()
|
|
type(t)
|
string
|
|
|
Get the type of the specified layout: FACTORY, FACTORY_OVERRIDE, MODULE, MODULE_OVERRIDE or USER.
|
|
Flag can appear in Create mode of command
|
Flag can appear in Edit mode of command
|
Flag can appear in Query mode of command
|
Flag can have multiple arguments, passed either as a tuple or a list.
|
import maya.cmds as cmds
cmds.workspaceLayoutManager( listLayouts=True )