This command returns panel and panel configuration information.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
allConfigs (ac) | bool | ||
|
|||
allPanels (all) | bool | ||
|
|||
allScriptedTypes (ast) | bool | ||
|
|||
allTypes (at) | bool | ||
|
|||
atPosition (ap) | int, int | ||
|
|||
configWithLabel (cwl) | unicode | ||
|
|||
containing (c) | unicode | ||
|
|||
invisiblePanels (inv) | bool | ||
|
|||
scriptType (sty) | unicode | ||
|
|||
type (typ) | unicode | ||
|
|||
typeOf (to) | unicode | ||
|
|||
underPointer (up) | bool | ||
|
|||
visiblePanels (vis) | bool | ||
|
|||
withFocus (wf) | bool | ||
|
|||
withLabel (wl) | unicode | ||
|
Derived from mel command maya.cmds.getPanel
Example:
import pymel.core as pm
pm.getPanel( all=True )
# Result: [ui.ModelEditor('modelPanel1|modelPanel1'), ui.ModelEditor('modelPanel2|modelPanel2'), ui.ModelEditor('modelPanel3|modelPanel3'), ui.ModelEditor('modelPanel4|modelPanel4'), ui.Panel('outlinerPanel1'), ui.ScriptedPanel('graphEditor1'), ui.ScriptedPanel('dopeSheetPanel1'), ui.ScriptedPanel('clipEditorPanel1'), ui.ScriptedPanel('sequenceEditorPanel1'), ui.ScriptedPanel('hyperGraphPanel1'), ui.ScriptedPanel('hyperShadePanel1'), ui.ScriptedPanel('visorPanel1'), ui.ScriptedPanel('polyTexturePlacementPanel1'), ui.ScriptedPanel('renderView'), ui.Panel('blendShapePanel1'), ui.ScriptedPanel('dynRelEdPanel1'), ui.ScriptedPanel('relationshipPanel1'), ui.ScriptedPanel('referenceEditorPanel1'), ui.ScriptedPanel('componentEditorPanel1'), ui.ScriptedPanel('dynPaintScriptedPanel'), ui.ScriptedPanel('scriptEditorPanel1')] #
pm.getPanel( type='modelPanel' )
# Result: [ui.ModelEditor('modelPanel1|modelPanel1'), ui.ModelEditor('modelPanel2|modelPanel2'), ui.ModelEditor('modelPanel3|modelPanel3'), ui.ModelEditor('modelPanel4|modelPanel4')] #
pm.getPanel( containing='button0' )
pm.getPanel( underPointer=True )
# Result: ui.ScriptedPanel('scriptEditorPanel1') #
pm.getPanel( withFocus=True )
# Result: ui.ModelEditor('modelPanel4|modelPanel4') #
# Whenever the hotBox's 'noClickCommand' is invoked, have it switch the
# main Maya view to a single pane configuration, displaying the panel
# which was under the mouse pointer at the time the 'hotBox' command was
# executed.
def panePopAt(x, y):
panel = pm.getPanel(atPosition=(x, y))
if panel != '':
mel.eval('doSwitchPanes(1, { "single", "' + panel + '" })')
pm.hotBox(noClickCommand=panePopAt, noClickPosition=True)