pymel.core.general.listSets

listSets(*args, **kwargs)

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.

Modifications:
  • returns wrapped classes
  • if called without arguments and keys works as with allSets=True
rtype:PyNode list
Flags:
Long name (short name) Argument Types Properties
allSets (allSets) bool ../../../_images/create.gif
 
Returns all sets in the scene.
extendToShape (ets) bool ../../../_images/create.gif
 
When requesting a transform’s sets also walk down to the shape immediately below it for its sets.
object (o) PyNode ../../../_images/create.gif
 
Returns all sets which this object is a member of.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.
type (t) int ../../../_images/create.gif
 
Returns all sets in the scene of the given type: 1 - all rendering sets2 - all deformer sets

Derived from mel command maya.cmds.listSets

Example:

import pymel.core as pm

import maya.cmds as cmds

# 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' )

Previous topic

pymel.core.general.listRelatives

Next topic

pymel.core.general.listTransforms

Core

Core Modules

Other Modules

This Page