pymel.core.windows.workspaceLayoutManager¶
- workspaceLayoutManager(*args, **kwargs)¶
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.
Flags:
Long Name / Short Name Argument Types Properties collapseMainWindowControls / cmw unicode, bool 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 bool Get the name of the current layout. delete / d unicode Delete the given workspace. The string is the name of the layout, not the file name. i / i unicode Import the given workspace file to the workspaces directory. The string is an absolute path. listLayouts / ll bool List the names of all registered layouts. listUserLayouts / lul bool List the names of user layouts. modified / m unicode Check whether or not the specified layout has been modified. parentWorkspaceControl / pwc unicode Returns the parent workspace control of the given UI (panel) or an empty string if it does not exist. reset / rs bool 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 bool Restores the main window layout to the one saved with the -cmw/-collapseMainWindowControlsflag. The loaded workspace file will be deleted once it is restored. save / s bool Save the current layout. saveAs / sa unicode Save the current layout under the specified name. setCurrent / sc unicode Load the given workspace. The string is the name of the layout, not the file name. setCurrentCallback / scc unicode MEL only. The string is interpreted as a MEL callback, which is called each time a layout is set as current (with -setCurrentflag). The callback is of the form: global proc MySetCurrentCallback(string $layoutName) setModifiedCallback / smc unicode 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 -modifiedflag value changes. The callback is of the form: global proc MySetModifiedCallback() type / t unicode Get the type of the specified layout: FACTORY, FACTORY_OVERRIDE or USER. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.workspaceLayoutManager
Example:
- ::
import pymel.core as pm
pm.workspaceLayoutManager( listLayouts=True ) # Result: [u’Animation’, u’Bifrost Fluids’, u’MASH’, u’Maya Classic’, u’Modeling - Expert’, u’Modeling - Standard’, u’Motion Graphics’, u’Pose Sculpting’, u’Rendering - Expert’, u’Rendering - Standard’, u’Rigging’, u’Sculpting’, u’UV Editing’, u’XGen’, u’XGen - Interactive Groom’] #