pymel.core.windows.panelConfiguration

panelConfiguration(*args, **kwargs)

This command creates a panel configuration object. Typically you would not call this method command directly. Instead use the Panel Editor. Once a panel configuration is created you can make it appear in the main Maya window by selecting it from any panel’s “Panels-Saved Layouts” menu.

Flags:
Long name (short name) Argument Types Properties
addPanel (ap) bool, unicode, unicode, unicode, unicode ../../../_images/create.gif ../../../_images/edit.gif
 
Adds the specified panel to the configuration. Arguments are: isFixed, label string, type string, create string, edit string.
configString (cfs) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies the string that arranges the panels.
createStrings (cs) bool ../../../_images/query.gif
 
Returns an string array of the panel creation strings.
defaultImage (di) unicode ../../../_images/create.gif ../../../_images/query.gif
 

The default image for this configuration. Once the default image is set it may not be changed. If an image is set with the -i/imageflag then it’s value will take precedence.

defineTemplate (dt) unicode ../../../_images/create.gif
 

Puts a command in a mode where any other flags and args 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.

editStrings (es) bool ../../../_images/query.gif
 
Returns an string array of the panel edit strings.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
exists (ex) bool ../../../_images/create.gif
 
Returns true|false depending upon whether the specified object exists. Other flags are ignored.
image (i) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
The user specified image for this configuration. Use this flag to override the default image.
isFixedState (isFixedState) bool ../../../_images/query.gif
 
Returns an integer array of whether the panels have fixed states or not.
label (l) unicode ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Configuration label.
labelStrings (ls) bool ../../../_images/query.gif
 
Returns an string array of the panel labels.
numberOfPanels (np) bool ../../../_images/query.gif
 
Returns the number of panels in the configuration.
removeAllPanels (rap) bool ../../../_images/edit.gif
 
Removes the last panel in the config.
removeLastPanel (rlp) bool ../../../_images/edit.gif
 
Removes the last panel in the config.
replaceCreateString (rcs) int, unicode ../../../_images/edit.gif
 
Replaces the specified create string. The index is 1 based.
replaceEditString (res) int, unicode ../../../_images/edit.gif
 
Replaces the specified edit string. The index is 1 based.
replaceFixedState (rfs) int, bool ../../../_images/edit.gif
 
Replaces the specified fixed state value (true|false). The index is 1 based.
replaceLabel (rl) int, unicode ../../../_images/edit.gif
 
Replaces the specified label. The index is 1 based.
replacePanel (rp) int, bool, unicode, unicode, unicode, unicode ../../../_images/create.gif ../../../_images/edit.gif
 
Replaces the specified panel in the configuration. Arguments are: index, isFixed, label string, type string, create string, edit string. The index is 1 based.
replaceTypeString (rts) int, unicode ../../../_images/edit.gif
 
Replaces the specified type string. The index is 1 based.
sceneConfig (sc) bool ../../../_images/create.gif ../../../_images/query.gif ../../../_images/edit.gif
 
Specifies whether the configuration is associated with the scene. Scene configurations are created when the scene is opened and deleted when the scene is closed.
typeStrings (ts) bool ../../../_images/query.gif
 
Returns an string array of the panel types.
useTemplate (ut) unicode ../../../_images/create.gif
 
Force the command to use a command template other than the current one.

Derived from mel command maya.cmds.panelConfiguration

Example:

import pymel.core as pm

import maya.cmds as cmds

#    Create a custom panel configuration.
#
configName = pm.panelConfiguration(
                                label="Custom Panel Layout",
                                sceneConfig=False,
                                configString="paneLayout -e -cn \"vertical2\" -ps 1 39 100 -ps 2 61 100 $gMainPane;",
                                addPanel=[
                                        (False,
                                        'Outliner',
                                        'outlinerPanel',
                                        ("{global int $gUseMenusInPanels;\
                                        $panelName = `outlinerPanel -mbv $gUseMenusInPanels -unParent -l \"Outliner\"`;\
                                        outlinerEditor -e -highlightActive true $panelName;}"),
                                        "outlinerPanel -edit -l \"Outliner\"  $panelName"),

                                        (True,
                                        "Persp View",
                                        "modelPanel",
                                        ("{global int $gUseMenusInPanels;\
                                        modelPanel -mbv $gUseMenusInPanels\
                                        -unParent -l \"Persp View\" -cam persp;}" ),
                                        "modelPanel -edit -l \"Persp View\"  -cam \"persp\" $panelName")
                                ]
                        )

#    Update the main Maya window to reflect the custom panel configuration.
#    Note also that your custom configuration may be selected from any
#    panel's "Panels-"Saved Layouts" menu.
#
maya.mel.eval('setNamedPanelLayout( "Custom Panel Layout" )')

Previous topic

pymel.core.windows.panel

Next topic

pymel.core.windows.panelHistory

Core

Core Modules

Other Modules

This Page