Go to: Synopsis. Flags. Return value. Python examples.
panel(
<panelName>
, [control=boolean], [copy=string], [defineTemplate=string], [docTag=string], [edit=boolean], [exists=boolean], [init=boolean], [isUnique=boolean], [label=string], [menuBarVisible=boolean], [needsInit=boolean], [parent=string], [popupMenuProcedure=string], [query=boolean], [replacePanel=string], [tearOff=boolean], [tearOffCopy=string], [unParent=boolean], [useTemplate=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
panel is undoable, queryable, and editable.
This command allows editing or querying properties of any panels. Not all of the common properites of panels can be used with this command. Flags such as -tearOff and -replacePanel require that you use the explicit panel command. The command 'getPanel -typeOf panelName' will return the explicit type of a panel.| Long name (short name) | [argument types] | Properties | ||
|---|---|---|---|---|
query(q)
|
boolean
|
|
||
|
||||
edit(e)
|
boolean
|
|
||
|
||||
exists(ex)
|
boolean
|
|
||
|
||||
defineTemplate(dt)
|
string
|
|
||
|
||||
useTemplate(ut)
|
string
|
|
||
|
||||
init(init)
|
boolean
|
|
||
|
||||
label(l)
|
string
|
|
||
|
||||
copy(cp)
|
string
|
|
||
|
||||
control(ctl)
|
boolean
|
|
||
|
||||
isUnique(iu)
|
boolean
|
|
||
|
||||
parent(p)
|
string
|
|
||
|
||||
popupMenuProcedure(pmp)
|
string
|
|
||
|
||||
unParent(up)
|
boolean
|
|
||
|
||||
replacePanel(rp)
|
string
|
|
||
|
||||
tearOff(to)
|
boolean
|
|
||
|
||||
tearOffCopy(toc)
|
string
|
|
||
|
||||
menuBarVisible(mbv)
|
boolean
|
|
||
|
||||
needsInit(ni)
|
boolean
|
|
||
|
||||
docTag(dt)
|
string
|
|
||
|
||||
import maya.cmds as cmds MyLabel = 'My Panel' cmds.window() cmds.frameLayout( lv=0 ) cmds.modelPanel( l=MyLabel ) cmds.showWindow() panels = cmds.getPanel( all=True ) for panel in panels: if MyLabel == cmds.panel( panel, q=True, label=True ): myPanel = panel print( 'Found: '+MyLabel )