Go to: Synopsis. Return value. Related. Flags. Python examples.

Synopsis

listSets( [object] , [allSets=boolean], [extendToShape=boolean], [object=name], [type=uint])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

listSets is undoable, NOT queryable, and NOT editable.

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.

Return value

string[](string array of all sets the object belongs to)

Related

sets

Flags

allSets, extendToShape, object, type
Long name (short name) Argument types Properties
allSets(allSets) boolean create
Returns all sets in the scene.
extendToShape(ets) boolean create
When requesting a transform's sets also walk down to the shape immediately below it for its sets.
object(o) name create
Returns all sets which this object is a member of.
type(t) uint create
Returns all sets in the scene of the given type:
  • 1 - all rendering sets
  • 2 - all deformer sets

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Get a list of all the sets which `nurbsSphere1` belongs to:
cmds.listSets( object='nurbsSphere1' )

# Get a list of all the deformer sets in the scene:
cmds.listSets( type=2 )

# Get a list of all the rendering sets which `coneShape1` belongs to:
cmds.listSets( type=1, object='coneShape1' )