Go to: Synopsis. Return value. Flags. Python examples.
snapshot(
[objects]
, [anchorTransform=string], [constructionHistory=boolean], [endTime=time], [increment=time], [motionTrail=boolean], [name=string], [offsetParentMatrix=boolean], [startTime=time], [update=string])
Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.
snapshot is undoable, queryable, and editable.
This command can be used to create either a series of surfaces evaluated at
the times specified by the command flags, or a motion trail displaying the
trajectory of the object's pivot point at the times specified.
If the constructionHistory flag is true, the output shapes or motion trail
will re-update when modifications are made to the animation or construction
history of the original shape. When construction history is used, the forceUpdate
flag can be set to false to control when the snapshot recomputes, which will
typically improve performance.
string[] | names of nodes created or edited: transform-name [snapshot-node-name] |
In query mode, return type is based on queried flag.
anchorTransform, constructionHistory, endTime, increment, motionTrail, name, offsetParentMatrix, startTime, update
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
# animate a sphere
cmds.sphere(n='sphere1')
cmds.currentTime('0')
cmds.setKeyframe('.t')
cmds.currentTime('30')
cmds.move(10,0,1)
cmds.setKeyframe('.t')
# Evaluate and display "sphere1" as it appears
# at times 0, 10, 20, and 30. Modifications to sphere1
# will update the copies.
#
cmds.snapshot( 'sphere1', constructionHistory=True, startTime=0, endTime=30, increment=10 )
# Evaluate and display "sphere1" as it appears
# at times 0, 10, 20, and 30. Further modifications to sphere1
# should have no affect on the copies since constructionHistory is off.
#
cmds.snapshot( 'sphere1', constructionHistory=False, startTime=0, endTime=30, increment=10 )