pymel.core.system.sceneUIReplacement

sceneUIReplacement(*args, **kwargs)

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.

Flags:
Long name (short name) Argument Types Properties
clear (cl) bool ../../../_images/create.gif
 
Frees any resources allocated by the command.
deleteRemaining (dr) bool ../../../_images/create.gif
 

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 ../../../_images/create.gif
 
Returns the next filter of the specified type with the specified name.
getNextPanel (gp) unicode, unicode ../../../_images/create.gif
 
Returns the next panel of the specified type, preferably with the specified label.
getNextScriptedPanel (gsp) unicode, unicode ../../../_images/create.gif
 
Returns the next scripted panel of the specified scripted panel type, preferably with the specified label.
update (u) unicode ../../../_images/create.gif
 

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.cmds as cmds

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

Previous topic

pymel.core.system.sceneName

Next topic

pymel.core.system.scriptNode

Core

Core Modules

Other Modules

This Page