User Guide

Working with Models and Model Resources 507
Keyframe player commands
Use these commands to work with keyframe animations:
Keyframe player properties
Use these properties to work with keyframe animations:
Command Description Returns
whichModel
.keyframePlayer.play
("
name", looped, startTime, endTime,
playRate
)
Plays the motion named name starting at the
time
startTime, with the currently playing
motion being pushed down the play list. If
looped is FALSE (0), the preceding
motion begins again when this motion
completes.
The
startTime parameter can be an
integer number of milliseconds, or it can be
the symbol
#synchronized. Use
#synchronized to start this new motion at
the same relative time offset to its total
duration as the currently playing motion is to
its total duration. The
playRate parameter
indicates how fast to play the motion. A value
of 2 doubles the speed of the motion. This
value is multiplied by the value of the
keyframePlayer.playRate property.
If blending is enabled, blending begins the
instant
play() is called.
Nothing
whichModel
.keyframePlayer.playNex
t
Ends the currently playing motion, removes it
from the play list, and begins the next motion.
If blending is enabled, blending begins the
instant
playNext() is called.
Nothing
whichModel
.keyframePlayer.queue("n
ame
", looped, startTime, endTime, playRate)
Adds the specified motion to the end of the
play list. The parameters are same as those for
the
play() command.
Nothing
whichModel
.keyframePlayer.removeL
ast()
Removes the most recently added motion
from the play list. The motion will be removed
from the play list even if it is also the currently
playing motion.
Nothing
whichModel
.keyframePlayer.pause() Pauses the Keyframe player. Nothing
Property Access Description Returns
whichModel
.
keyframePlayer.
playing
Get TRUE (1)= playing; FALSE (0)= paused. TRUE (1)
whichModel.
keyframePlayer.
playList
Get A linear list of property lists, where each
property list yields the parameters for the
currently playing and queued animations. For
example,
[[#name: "Walk_rt_turn",
#loop: 0, #startTime: 0,
#endTime: 4000, #scale:
1.0000], [#name: "Walk",
#loop: 1, #startTime: 0,
#endTime: -1, #scale: 1.0000]]
.
Empty list []
whichModel
.
keyframePlayer.
currentTime
Get and set Current local time of motion at top of play list,
in milliseconds.
0