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

Synopsis

dagPose( [objects] , [addToPose=boolean], [atPose=boolean], [bindPose=boolean], [g=boolean], [members=boolean], [name=string], [remove=boolean], [reset=boolean], [restore=boolean], [save=boolean], [selection=boolean], [worldParent=boolean])

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

dagPose is undoable, queryable, and editable.

This command is used to save and restore the matrix information for a dag hierarchy. Specifically, the data stored will restore the translate, rotate, scale, scale pivot, rotate pivot, rotation order, and (for joints) joint order for all the objects on the hierarchy. Data for other attributes is not stored by this command.

This command can also be used to store a bindPose for an object. When you skin an object, a dagPose is automatically created for the skin.

Return value

stringName of pose

In query mode, return type is based on queried flag.

Related

bindSkin, retarget, skinCluster

Flags

addToPose, atPose, bindPose, g, members, name, remove, reset, restore, save, selection, worldParent
Long name (short name) Argument types Properties
save(s) boolean create
Save a dagPose for the selected dag hierarchy. The name of the new pose will be returned.
restore(r) boolean create
Restore the hierarchy to a saved pose. To specify the pose, select the pose node, or use the -bp/-bindPose or -n/-name flag.
name(n) string createquery
Specify the name of the pose. This can be used during create, restore, reset, remove, and query operations to specify the pose to be created or acted upon.
bindPose(bp) boolean createquery
Used to specify the bindPose for the selected hierarchy. Each hierarchy can have only a single bindPose, which is saved automatically at the time of a skin bind. The bindPose is used when adding influence objects, binding new skins, or adding flexors. Take care when modifying the bindPose with the -rs/-reset or -rm/-remove flags, since if the bindPose is ill-defined it can cause problems with subsequent skinning operations.
reset(rs) boolean create
Reset the pose on the selected joints. If you are resetting pose data for a bindPose, take care. It is appropriate to use the -rs/-reset flag if a joint has been reparented and/or appears to be exactly at the bindPose. However, a bindPose that is much different from the exact bindPose can cause problems with subsequent skinning operations.
remove(rm) boolean create
Remove the selected joints from the specified pose.
members(m) boolean query
Query the members of the specified pose. The pose should be specified using the selection list, the -bp/-bindPose or the -n/-name flag.
atPose(ap) boolean query
Query whether the hierarchy is at same position as the pose. Names of hierarchy members that are not at the pose position will be returned. An empty return list indicates that the hierarchy is at the pose.
g(g) boolean create
This flag can be used in conjunction with the restore flag to signal that the members of the pose should be restored to the global pose. The global pose means not only is each object locally oriented with respect to its parents, it is also in the same global position that it was at when the pose was saved. If a hierarchy's parenting has been changed since the time that the pose was saved, you may have trouble reaching the global pose.
selection(sl) boolean createquery
Whether or not to store a pose for all items in the hierarchy, or for only the selected items.
addToPose(a) boolean create
Allows adding the selected items to the dagPose.
worldParent(wp) boolean create
Indicates that the selected pose member should be recalculated as if it is parented to the world. This is typically used when you plan to reparent the object to world as the next operation.

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

# To create a pose for all objects parented above and below
# the selected items.
#
cmds.dagPose( save=True )

# To create a dagPose named "mypose" for the selected items only and not
# the dag objects parented below the selected items.
#
cmds.dagPose( save=True, selection=True, name='mypose' )

# To restore the local (rather than global) mypose pose
#
cmds.dagPose( 'mypose', restore=True )

# To restore the mypose pose in global mode.
#
cmds.dagPose( 'mypose', restore=True, global=True )

# To query the members of the mypose pose.
#
cmds.dagPose( 'mypose', query=True, members=True )

# To return the name (if any) of the bindPose attached to the
# selected items.
#
cmds.dagPose( q=True, bindPose=True )

# To reset the pose data on a joint named bigToe for "mypose"
#
cmds.dagPose( 'bigToe', reset=True, n='mypose' )

# To remove a joint named pinky from "mypose"
#
cmds.dagPose( 'pinky', remove=True, n='mypose' )

# To restore the skeleton to its bindPose
#
cmds.dagPose( restore=True, global=True, bindPose=True )