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 ../../../_images/create.gif
  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 ../../../_images/create.gif ../../../_images/query.gif
  Get the name of the current layout.
delete / d unicode ../../../_images/create.gif
  Delete the given workspace. The string is the name of the layout, not the file name.
i / i unicode ../../../_images/create.gif
  Import the given workspace file to the workspaces directory. The string is an absolute path.
listLayouts / ll bool ../../../_images/create.gif
  List the names of all registered layouts.
listUserLayouts / lul bool ../../../_images/create.gif
  List the names of user layouts.
modified / m unicode ../../../_images/create.gif
  Check whether or not the specified layout has been modified.
parentWorkspaceControl / pwc unicode ../../../_images/create.gif
  Returns the parent workspace control of the given UI (panel) or an empty string if it does not exist.
reset / rs bool ../../../_images/create.gif
  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 ../../../_images/create.gif
  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 ../../../_images/create.gif
  Save the current layout.
saveAs / sa unicode ../../../_images/create.gif
  Save the current layout under the specified name.
setCurrent / sc unicode ../../../_images/create.gif
  Load the given workspace. The string is the name of the layout, not the file name.
setCurrentCallback / scc unicode ../../../_images/create.gif
  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 ../../../_images/create.gif
  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 ../../../_images/create.gif
  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’] #