pymel.core.general.isolateSelect

static general.isolateSelect(*args, **kwargs)

This command turns on/off isolate select mode in a specified modeling view, specified as the argument. Isolate select mode is a display mode where the currently selected objects are added to a list and only those objects are displayed in the view. It allows for selective viewing of specific objects and object components.

Flags:
Long name (short name) Argument Types Properties
addDagObject (ado) PyNode  
 
Add the specified object to the set of objects to be displayed in the view.
addSelected (addSelected) bool  
 
Add the currently active objects to the set of objects to be displayed in the view.
loadSelected (ls) bool  
 
Replace the objects being displayed with the currently active objects.
removeSelected (rs) bool  
 
Remove the currently active objects to the set of objects to be displayed in the view.
state (s) bool ../../../_images/query.gif
 
Turns isolate select mode on/off.
update (u) bool  
 

Update the view’s list of objects due to a change to the set of objects to be displayed. Flag can have multiple arguments, passed either as a tuple or a list.

viewObjects (vo) bool ../../../_images/query.gif
 

Returns the name (if any) of the objectSet which contains the list of objects visible in the view if isolate select mode is on. If isolate select mode is off, an empty string is returned.

Derived from mel command maya.cmds.isolateSelect

Example:

import pymel.core as pm

# create some primitives and go into component selection mode
pm.sphere( n='sphere1' )
# Result: [nt.Transform(u'sphere1'), nt.MakeNurbSphere(u'makeNurbSphere1')] #
pm.cone( n='cone1' )
# Result: [nt.Transform(u'cone1'), nt.MakeNurbCone(u'makeNurbCone1')] #
pm.selectMode( component=True )

# to query the current modelPanel, you can use the command
#
pm.paneLayout('viewPanes', q=True, pane1=True)
# Result: u'modelPanel4' #

# turn on isolate select mode for a particular 3d view. Only
# the sphere and the selected CVs will be displayed.
pm.select( 'sphere1.cv[0:2][*]' )
pm.isolateSelect( 'modelPanel1', state=1 )

# add the code to the list of objects to be viewed
pm.select( 'cone1' )
pm.isolateSelect( 'modelPanel1', addSelected=True )

# make just the sphere the object to be viewed
pm.select( 'sphere1' )
pm.isolateSelect( 'modelPanel1', loadSelected=True )

Previous topic

pymel.core.general.isTrue

Next topic

pymel.core.general.itemFilter

Core

Core Modules

Other Modules

This Page