3D Lingo Dictionary > A-B > bonesPlayer (modifier) |
![]() ![]() ![]() |
bonesPlayer (modifier)
Syntax
member(
whichCastmember
).model(
whichModel
).bonesPlayer.
whichBonesPlayerProperty
Description
3D modifier; manages the use of motions by models. The motions managed by the bonesPlayer
modifier animate segments, called bones, of the model.
Motions and the models that use them must be created in a 3D modeling program, exported as W3D files, and then imported into a movie. Motions cannot be applied to model primitives created within Director.
Adding the bonesPlayer
modifier to a model by using the addModifier
command allows access to the following bonesPlayer
modifier properties:
playing indicates whether a model is executing a motion.
playlist is a linear list of property lists containing the playback parameters of the motions that are queued for a model.
currentTime indicates the local time, in milliseconds, of the currently playing or paused motion.
playRate is a number that is multiplied by the scale
parameter of the play()
or queue()
command to determine the playback speed of the motion.
playlist.count returns the number of motions currently queued in the playlist.
rootLock indicates whether the translational component of the motion is used or ignored.
currentLoopState indicates whether the motion plays once or repeats continuously.
blendTime indicates the length of the transition created by the modifier between motions when the modifier's autoblend
property is set to TRUE
.
autoblend indicates whether the modifier creates a linear transition to the currently playing motion from the motion that preceded it.
blendFactor indicates the degree of blending between motions when the modifier's autoBlend
property is set to FALSE
.
bone[boneId].transform indicates the transform of the bone relative to the parent bone. You can find the boneId value by testing the getBoneID
property of the model resource. When you set the transform of a bone, it is no longer controlled by the current motion, and cannot be returned to the control of the motion. Manual control ends when the current motion ends.
bone[boneId].getWorldTransform returns the world-relative transform of the bone.
lockTranslation indicates whether the model can be displaced from the specified planes.
positionReset indicates whether the model returns to its starting position after the end of a motion or each iteration of a loop.
rotationReset indicates the rotational element of a transition from one motion to the next, or the looping of a single motion.
Note: For more detailed information about these properties, see the individual property entries.
The bonesPlayer
modifier uses the following commands:
pause()
halts the motion currently being executed by the model.
play()
initiates or unpauses the execution of a motion.
playNext()
initiates playback of the next motion in the playlist.
queue()
adds a motion to the end of the playlist.
The bonesPlayer
modifier generates the following events, which are used by handlers declared in the registerForEvent()
and registerScript()
commands. The call to the declared handler includes three arguments: the event type (either #animationStarted
or #animationEnded
), the name of the motion, and the current time of the motion. For detailed information about notification events, see the entry for registerForEvent()
.
#animationStarted
is sent when a motion begins playing. If blending is used between motions, the event is sent when the transition begins.
#animationEnded
is sent when a motion ends. If blending is used between motions, the event is sent when the transition ends.
See also
keyframePlayer (modifier)
, addModifier
, modifiers
, modifier
![]() ![]() ![]() |