pymel.core.general.isolateSelect¶
- 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. addSelectedObjects / aso bool Add selected objects to the set of objects to be displayed in the view. This flag differs from addSelected in that it will ignore selected components and add the entire object. loadSelected / ls bool Replace the objects being displayed with the currently active objects. removeDagObject / rdo PyNode Remove the specified object from the set of objects to be displayed in the view. removeSelected / rs bool Remove the currently active objects to the set of objects to be displayed in the view. state / s bool 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. 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. Flag can have multiple arguments, passed either as a tuple or a list. 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 )