This command returns panel and panel configuration information.
Flags:
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.Panel('modelPanel1'), ui.Panel('modelPanel2'), ui.Panel('modelPanel3'), ui.Panel('modelPanel4'), ui.Panel('outlinerPanel1'), ui.Panel('graphEditor1'), ui.Panel('dopeSheetPanel1'), ui.Panel('clipEditorPanel1'), ui.Panel('sequenceEditorPanel1'), ui.Panel('hyperGraphPanel1'), ui.Panel('hyperShadePanel1'), ui.Panel('visorPanel1'), ui.Panel('nodeEditorPanel1'), ui.Panel('createNodePanel1'), ui.Panel('polyTexturePlacementPanel1'), ui.Panel('renderView'), ui.Panel('blendShapePanel1'), ui.Panel('dynRelEdPanel1'), ui.Panel('relationshipPanel1'), ui.Panel('referenceEditorPanel1'), ui.Panel('componentEditorPanel1'), ui.Panel('dynPaintScriptedPanel'), ui.Panel('scriptEditorPanel1'), ui.Panel('StereoPanel')] #
pm.getPanel( type='modelPanel' )
# Result: [ui.Panel('modelPanel1'), ui.Panel('modelPanel2'), ui.Panel('modelPanel3'), ui.Panel('modelPanel4')] #
pm.getPanel( containing='button0' )
pm.getPanel( underPointer=True )
pm.getPanel( withFocus=True )
# Result: ui.Panel('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)