Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

workspacePanel([defineTemplate=string], [exists=boolean], [mainWindow=boolean], [useTemplate=string])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

workspacePanel is undoable, queryable, and editable.

Workspace panel.

Return value

stringFull path name to the workspace panel.

In query mode, return type is based on queried flag.

Flags

defineTemplate, exists, mainWindow, useTemplate
Long name (short name) Argument types Properties
defineTemplate(dt) string create
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.
exists(ex) boolean create
Returns whether the specified object exists or not. Other flags are ignored.
mainWindow(mw) boolean createqueryedit
Main window for the application. The main window has an 'Exit' item in the Window Manager menu. By default, the first created window becomes the main window.
useTemplate(ut) string create
Forces the command to use a command template other than the current one.

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.

Python examples

import maya.cmds as cmds

cmds.workspacePanel(mainWindow=True)