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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
addDagObject (ado) | PyNode | ||
|
|||
addSelected (addSelected) | bool | ||
|
|||
loadSelected (ls) | bool | ||
|
|||
removeSelected (rs) | bool | ||
|
|||
state (s) | bool | ||
|
|||
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 | ||
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 )