9

Transform Script Controller 379
similar to hig h tension except without the E a se To
and Ease From side effect.
The default setting creates a smooth continuous
cur ve at the key.
Bias—Controls where the animation curve occurs
w ith respect to the key. Default=25.
High Bias pushes the curve b e yond the key. This
produces a linear curve coming into the key and
an exaggerated cur ve leaving the key.
LowBiaspullsthecurvebeforethekey. This
produces an exaggerated curve coming into the
key and a line ar curve leaving the key.
The default setting distributes the cur ve e venly to
both sides of the key.
Rotation Wi ndup (TCB r otation only)—When on,
rotation keys can be greater than 180 degrees.
When off, rotation keys a re always less tha n 180
degrees. This is useful if you want to set a single
rotation key to create multiple revolutions of an
object. Default=off.
Wa rning: If you have Rotation Windup on and you
insert a rotation key between two previously created
rotation keys, you might get unexpected directional
shifts. Rotation Windup works best if you set keys using
a straight-ahead workflow.
Tr ans for m S cr i pt Contr oll er
Maintoolbar>CurveEditor(Open)>Selectatransform
track in the Track View hierarchy. > Track View menu bar
> Controller menu > Assign > Transform Script
Graph Editors > Track View - Curve Editor > Select a
transform track in the Track View hierarchy. > Track View
menu bar > Controller menu > Assign > Transform Script
Animation men u > Transform Controllers > Script
The Transform Script controller contains all of the
information contained in a Position/Rotation/Scale
(PRS) controller (page 2–357) in one scripted
matrix value. Instead of having three separate
tracks for position, rotation, and sca le, all three
values can be simultaneously accessed from one
script controller dialog. Because the transform
values are defined by a script, they are easier to
animate.
The value of the con troller script must be a matrix3
value. A matrix3 value is a 4x3 3D transformation
matrix. For more information, see the Matrix3
Values topic in the MAXScript reference.
Writing Controller Scr ipts
Thesoftwareinterpretsthetextyoutypeintothe
Script text box as the body of a MAXScript block
expression. You can ty p e as many expressions
as you want on as many lines as you want, and
they are evaluated in turn. The value of the last
expression is taken as the controller value. This
must yield a matrix3 value.
Since the text is inside a block expression, you can
declare local variables that are visible only within
thescriptandaretemporaryforoneevaluation.
You can also declare or access global variables that
are shared with all other scripts in MAXScript and
hold their values from one evaluation to the next.
A controller is always evaluated with respect to
a specific animation time by the software. This
mightbethecurrenttimesliderorincrementing
frame time if an animation is playing, or a
renderingisunderway. InthecaseofScript
controllers,thetimebeingevaluatedisusedto
establish an automatic "at t ime" context around
the controller script, so any propert ies you access
(outside of other explicit “at time expressions)
yield the correct values for the current controller
evaluation time. This means you don’t have to
do anything special in your scripts to work at
the correct time. You can access the evaluation