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

Synopsis

devicePanel([control=boolean], [copy=string], [createString=boolean], [defineTemplate=string], [docTag=string], [editString=boolean], [exists=boolean], [init=boolean], [isUnique=boolean], [label=string], [menuBarRepeatLast=boolean], [menuBarVisible=boolean], [needsInit=boolean], [parent=string], [popupMenuProcedure=script], [replacePanel=string], [tearOff=boolean], [tearOffCopy=string], [tearOffRestore=boolean], [unParent=boolean], [useTemplate=string])

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

devicePanel is undoable, queryable, and editable.

This command is now obsolete. It is included only for the purpose of file compatibility. It creates a blank panel.

Return value

stringname of panel

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

Related

assignInputDevice, attachDeviceAttr, detachDeviceAttr, getInputDeviceRange, getModifiers, listDeviceAttachments, listInputDeviceAxes, listInputDeviceButtons, listInputDevices, recordAttr, setAttrMapping, setInputDeviceMapping, unassignInputDevice

Flags

control, copy, createString, defineTemplate, docTag, editString, exists, init, isUnique, label, menuBarRepeatLast, menuBarVisible, needsInit, parent, popupMenuProcedure, replacePanel, tearOff, tearOffCopy, tearOffRestore, unParent, useTemplate
Long name (short name) Argument types Properties
control(ctl) boolean query
Returns the top level control for this panel. Usually used for getting a parent to attach popup menus. CAUTION: panels may not have controls at times. This flag can return "" if no control is present.
copy(cp) string edit
Makes this panel a copy of the specified panel. Both panels must be of the same type.
createString(cs) boolean edit
Command string used to create a panel
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.
docTag(dtg) string createqueryedit
Attaches a tag to the Maya panel.
editString(es) boolean edit
Command string used to edit a panel
exists(ex) boolean create
Returns whether the specified object exists or not. Other flags are ignored.
init(init) boolean createedit
Initializes the panel's default state. This is usually done automatically on file -new and file -open.
isUnique(iu) boolean query
Returns true if only one instance of this panel type is allowed.
label(l) string queryedit
Specifies the user readable label for the panel.
menuBarRepeatLast(mrl) boolean createqueryedit
Controls whether clicking on the menu header with the middle mouse button would repeat the last selected menu item.
menuBarVisible(mbv) boolean createqueryedit
Controls whether the menu bar for the panel is displayed.
needsInit(ni) boolean queryedit
(Internal) On Edit will mark the panel as requiring initialization. Query will return whether the panel is marked for initialization. Used during file -new and file -open.
parent(p) string create
Specifies the parent layout for this panel.
popupMenuProcedure(pmp) script queryedit
Specifies the procedure called for building the panel's popup menu(s). The default value is "buildPanelPopupMenu". The procedure should take one string argument which is the panel's name.
replacePanel(rp) string edit
Will replace the specified panel with this panel. If the target panel is within the same layout it will perform a swap.
tearOff(to) boolean queryedit
Will tear off this panel into a separate window with a paneLayout as the parent of the panel. When queried this flag will return if the panel has been torn off into its own window.
tearOffCopy(toc) string create
Will create this panel as a torn of copy of the specified source panel.
tearOffRestore(tor) boolean createedit
Restores panel if it is torn off and focus is given to it. If docked, becomes the active panel in the docked window. This should be the default flag that is added to all panels instead of -to/-tearOff flag which should only be used to tear off the panel.
unParent(up) boolean edit
Specifies that the panel should be removed from its layout. This (obviously) cannot be used with query.
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

# This example creates a new device panel in its own window
window = cmds.window()
cmds.paneLayout()
cmds.devicePanel()
cmds.showWindow( window )