Go to: Synopsis. Return value. Keywords. Related. Flags. Python examples.
pose([allPoses=boolean], [apply=boolean], [name=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
pose is undoable, queryable, and editable.
This command is used to create character poses.
In query mode, return type is based on queried flag.
character, clip, animation, pose
character, clip, clipEditor, clipSchedule, pose
allPoses, apply, name
Long name (short name) |
Argument types |
Properties |
name(n)
|
string
|
|
|
In create mode, specify the pose name. In query mode, return a list of all the poses for the character. In apply mode, specify the pose to be applied.
|
|
apply(a)
|
boolean
|
|
|
This flag is used in conjunction with the name flag to specify a pose should be applied to the character.
|
|
allPoses(ap)
|
boolean
|
|
|
This flag is used to query all the poses in the scene.
|
|
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.
|
import maya.cmds as cmds
# First, create a character to hold the pose. The character will be
# a 3-bone skeleton named "arm".
#
cmds.select( d=True )
cmds.joint( p=(0, 0, 0) )
cmds.joint( p=(0, 4, 0) )
cmds.joint( 'joint1', e=True, zso=True, oj='xyz' )
cmds.joint( p=(0, 8, -1) )
cmds.joint( 'joint2', e=True, zso=True, oj='xyz' )
cmds.joint( p=(0, 9, -2) )
cmds.joint( 'joint3', e=True, zso=True, oj='xyz' )
cmds.select( 'joint2', 'joint3', 'joint1', r=True )
cmds.character( name='arm' )
# Create a pose for the current joint position named "handWave"
#
cmds.pose( 'arm', name='handWave' )
# Query the existing poses
#
cmds.pose( 'arm', query=True, n=True )
# Restore the pose onto the character
#
cmds.pose( 'arm', name='handWave', apply=True )