pymel.core.animation.reorderDeformers¶
- reorderDeformers(*args, **kwargs)¶
This command changes the order in which 2 deformation nodes affect the output geometry. The first string argument is the name of deformer1, the second is deformer2, followed by the list of objects they deform. It inserts deformer2 before deformer1. Currently supported deformer nodes include: sculpt, cluster, jointCluster, lattice, wire, jointLattice, boneLattice, blendShape.
Flags:
Long Name / Short Name Argument Types Properties name / n unicode This flag is obsolete and is not used. Flag can have multiple arguments, passed either as a tuple or a list. Derived from mel command maya.cmds.reorderDeformers
Example:
import pymel.core as pm # Create some geometry to deform pm.sphere( name='sphere1' ) # Result: [nt.Transform(u'sphere1'), nt.MakeNurbSphere(u'makeNurbSphere1')] # pm.sphere( name='sphere2' ) # Result: [nt.Transform(u'sphere2'), nt.MakeNurbSphere(u'makeNurbSphere2')] # # Create a couple of deformers pm.select( 'sphere1Shape', 'sphere2Shape' ) pm.sculpt( name='sculpt1' ) # Result: [nt.Sculpt(u'sculpt1'), nt.Transform(u'sculptor1'), nt.Transform(u'sculpt1StretchOrigin')] # pm.select( 'sphere1Shape', 'sphere2Shape' ) pm.cluster( name='cluster1' ) # Result: [nt.Cluster(u'cluster1'), nt.Transform(u'cluster1Handle')] # # Change their order pm.reorderDeformers( 'sculpt1', 'cluster1', 'sphere1Shape', 'sphere2Shape' )