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

Synopsis

sceneUIReplacement([clear=boolean], [deleteRemaining=boolean], [getNextFilter=[string, string]], [getNextPanel=[string, string]], [getNextScriptedPanel=[string, string]], [update=string])

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

sceneUIReplacement is undoable, NOT queryable, and NOT editable.

This command returns existing scene based UI that can be utilized by the scene that is being loaded. It can also delete any such UI that is not used by the loading scene.

Return value

stringWhen used with getNextScriptedPanel, getNextPanel, or getNextFilter

Flags

clear, deleteRemaining, getNextFilter, getNextPanel, getNextScriptedPanel, update
Long name (short name) Argument types Properties
update(u) string create
Updates the state of the command to reflect the current state of the application. The string argument is the name of the main window pane layout holding the panels.
clear(cl) boolean create
Frees any resources allocated by the command.
getNextScriptedPanel(gsp) [string, string] create
Returns the next scripted panel of the specified scripted panel type, preferably with the specified label.
getNextFilter(gf) [string, string] create
Returns the next filter of the specified type with the specified name.
getNextPanel(gp) [string, string] create
Returns the next panel of the specified type, preferably with the specified label.
deleteRemaining(dr) boolean create
Delete any UI that is scene dependent and has not been referenced by this command since the last update.

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

import maya.mel as mm
gMainPane = mm.eval( 'global string $gMainPane; $temp = $gMainPane;' )
cmds.sceneUIReplacement( update=gMainPane )

# Try to find the modelPanel named Top View
cmds.sceneUIReplacement( getNextPanel=('modelPanel','Top View') )
# Result: modelPanel1 #
cmds.modelPanel( 'modelPanel1', q=True, label=True )
# Result: Top View #

# Try to find Front View
cmds.sceneUIReplacement( getNextPanel=('modelPanel', 'Front View') )
# Result: modelPanel3 #
cmds.modelPanel( 'modelPanel3', q=True, label=True )
# Result: Front View #

# Is there another Front View?  (No: all we find is a model panel called Persp View)
cmds.sceneUIReplacement( getNextPanel=('modelPanel', 'Front View') )
# Result: modelPanel4
cmds.modelPanel( 'modelPanel4', q=True, label=True )
# Result: Persp View