Go to: Synopsis. Return value. Flags. MEL examples.

Synopsis

getPanel [-allConfigs] [-allPanels] [-allScriptedTypes] [-allTypes] [-atPosition int int] [-configWithLabel string] [-containing string] [-invisiblePanels] [-scriptType string] [-type string] [-typeOf string] [-underPointer] [-visiblePanels] [-withFocus] [-withLabel string]

getPanel is undoable, NOT queryable, and NOT editable.

This command returns panel and panel configuration information.

Return value

string[]An array of panel names

Flags

allConfigs, allPanels, allScriptedTypes, allTypes, atPosition, configWithLabel, containing, invisiblePanels, scriptType, type, typeOf, underPointer, visiblePanels, withFocus, withLabel
Long name (short name) Argument types Properties
-allConfigs(-ac) create
Return the names of the all panel configuration in a string array.
-allPanels(-all) create
Return the names of all the panels in a string array.
-allScriptedTypes(-ast) create
Return the names of all types of scripted panels in a string array.
-allTypes(-at) create
Return the names of all types of panels, except scripted types in a string array.
-atPosition(-ap) int int create
Return the name of the panel which contains the specified screen coordinates. An empty string is returned if there is no panel at those coordinates.
-configWithLabel(-cwl) string create
Return the name of the panel configuration with the specified label text.
-containing(-c) string create
Return the name of the panel containing the specified control. An empty string is returned if the specified control is not in any panel.
-invisiblePanels(-inv) create
Return the names of all the invisible panels in a string array.
-scriptType(-sty) string create
Return the names of all scripted panels of the specified type in a string array.
-type(-typ) string create
Return the names of all panels of the specified type in a string array.
-typeOf(-to) string create
Return the type of the specified panel.
-underPointer(-up) create
Return the name of the panel that the pointer is currently over. An empty string is returned if the pointer is not over any panel.
-visiblePanels(-vis) create
Return the names of all the visible panels in a string array.
-withFocus(-wf) create
Return the name of the panel that currently has focus. If no panel has focus then the last panel that had focus is returned.
-withLabel(-wl) string create
Return the name of the panel with the specified label text.

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 be used more than once in a command.

MEL examples

getPanel -all;
getPanel -type modelPanel;
getPanel -containing button0;
getPanel -underPointer;
getPanel -withFocus;

// 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.
global proc panePopAt(int $x, int $y)
{
	string	$panel = `getPanel -atPosition $x $y`;

	if ($panel != "") {
		doSwitchPanes(1, { "single", $panel });
	}
}

hotBox -noClickCommand panePopAt -noClickPosition;