This command is used to create character poses.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
allPoses (ap) | bool | ||
This flag is used to query all the poses in the scene.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
apply (a) | bool | ||
|
|||
name (n) | unicode | ||
|
Derived from mel command maya.cmds.pose
Example:
import pymel.core as pm
import maya.cmds as cmds
# First, create a character to hold the pose. The character will be
# a 3-bone skeleton named "arm".
#
pm.select( d=True )
pm.joint( p=(0, 0, 0) )
# Result: nt.Joint(u'joint1') #
pm.joint( p=(0, 4, 0) )
# Result: nt.Joint(u'joint2') #
pm.joint( 'joint1', e=True, zso=True, oj='xyz' )
# Result: nt.Joint(u'joint2') #
pm.joint( p=(0, 8, -1) )
# Result: nt.Joint(u'joint3') #
pm.joint( 'joint2', e=True, zso=True, oj='xyz' )
# Result: nt.Joint(u'joint3') #
pm.joint( p=(0, 9, -2) )
# Result: nt.Joint(u'joint4') #
pm.joint( 'joint3', e=True, zso=True, oj='xyz' )
# Result: nt.Joint(u'joint4') #
pm.select( 'joint2', 'joint3', 'joint1', r=True )
pm.character( name='arm' )
# Result: nt.Character(u'arm') #
# Create a pose for the current joint position named "handWave"
#
pm.pose( 'arm', name='handWave' )
# Result: u'handWave' #
# Query the existing poses
#
pm.pose( 'arm', query=True, n=True )
# Result: [u'handWave'] #
# Restore the pose onto the character
#
pm.pose( 'arm', name='handWave', apply=True )