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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
clear (cl) | bool | ||
|
|||
deleteRemaining (dr) | bool | ||
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 commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
getNextFilter (gf) | unicode, unicode | ||
|
|||
getNextPanel (gp) | unicode, unicode | ||
|
|||
getNextScriptedPanel (gsp) | unicode, unicode | ||
|
|||
update (u) | unicode | ||
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. |
Derived from mel command maya.cmds.sceneUIReplacement
Example:
import pymel.core as pm
import maya.mel as mm
gMainPane = mm.eval( 'global string $gMainPane; $temp = $gMainPane;' )
pm.sceneUIReplacement( update=gMainPane )
# Result: u'1' #
# Try to find the modelPanel named Top View
pm.sceneUIReplacement( getNextPanel=('modelPanel','Top View') )
# Result: u'modelPanel1' #
pm.modelPanel( 'modelPanel1', q=True, label=True )
# Result: u'Top View' #
# Try to find Front View
pm.sceneUIReplacement( getNextPanel=('modelPanel', 'Front View') )
# Result: u'modelPanel3' #
pm.modelPanel( 'modelPanel3', q=True, label=True )
# Result: u'Front View' #
# Is there another Front View? (No: all we find is a model panel called Persp View)
pm.sceneUIReplacement( getNextPanel=('modelPanel', 'Front View') )
# Result: u'modelPanel4' #
# Result: modelPanel4
pm.modelPanel( 'modelPanel4', q=True, label=True )
# Result: u'Persp View' #
# Result: Persp View