The listSets command is used to get a list of all the sets an object belongs to. To get sets of a specific type for an object use the type flag as well. To get a list of all sets in the scene then don’t use an object in the command line but use one of the flags instead.
| Long name (short name) | Argument Types | Properties | |
|---|---|---|---|
| allSets (allSets) | bool |
|
|
|
|||
| extendToShape (ets) | bool |
|
|
|
|||
| object (o) | PyNode |
|
|
|
|||
| type (t) | int |
|
|
|
|||
Derived from mel command maya.cmds.listSets
Example:
import pymel.core as pm
# Get a list of all the sets which `nurbsSphere1` belongs to:
pm.listSets( object='nurbsSphere1' )
# Get a list of all the deformer sets in the scene:
pm.listSets( type=2 )
# Get a list of all the rendering sets which `coneShape1` belongs to:
pm.listSets( type=1, object='coneShape1' )