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.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
constructionHistory (ch) | bool | ||
|
|||
endTime (et) | time | ||
|
|||
increment (i) | time | ||
|
|||
motionTrail (mt) | bool | ||
Rather than create a series of surfaces, create a motion trail displaying the location of the object’s pivot point at the specified time steps. Default is false.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
name (n) | unicode | ||
|
|||
startTime (st) | time | ||
|
|||
update (u) | unicode | ||
This flag can only be used if the snapshot has constructionHistory. It sets the snapshot node’s update value. The update value controls whether the snapshot updates on demand (most efficient), when keyframes change (efficient), or whenever any history changes (least efficient). Valid values are “demand”, “animCurve”, “always”. Default: “always” |
Derived from mel command maya.cmds.snapshot
Example:
import pymel.core as pm
# animate a sphere
pm.sphere(n='sphere1')
# Result: [nt.Transform(u'sphere1'), nt.MakeNurbSphere(u'makeNurbSphere1')] #
pm.currentTime('0')
# Result: 0.0 #
pm.setKeyframe('.t')
# Result: 3 #
pm.currentTime('30')
# Result: 30.0 #
pm.move(10,0,1)
pm.setKeyframe('.t')
# Result: 3 #
# Evaluate and display "sphere1" as it appears
# at times 0, 10, 20, and 30. Modifications to sphere1
# will update the copies.
#
pm.snapshot( 'sphere1', constructionHistory=True, startTime=0, endTime=30, increment=10 )
# Result: [nt.GeometryVarGroup(u'snapshot1Group'), nt.MotionTrail(u'snapshot1')] #
# 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.
#
pm.snapshot( 'sphere1', constructionHistory=False, startTime=0, endTime=30, increment=10 )
# Result: [nt.GeometryVarGroup(u'snapshotGroup')] #