9
374 Chapter 12: Animation
Note:
The Time Offset has no effect on variables
that are assig ned a constant.
Varia bles List—Lists all available variables in the
controller. The following pre-defined constant
variables are available in every script Controller
and c annot be deleted or renamed:
•
F—the cur rent time in fr ames
•
NT—the norma lized t ime
•
S—the cur rent time in seconds
•
T—the cur rent time in ticks
Assign Constant—Opens a dialog which lets you
assign a constant to the highlighted variable.
Value expression—Enter any MA XScript value
(such as an integer, a float, an array, etc.) or
expression.
Value expression r esult—Displays the results of the
expression above.
Evaluate—Analyzes your expression at t he current
time.
OK —Assigns the v a lue expression result to the
current variable.
Cancel—Disregards the current va lue expression
result and closes the dialog.
Assign Track —Lets you assign a controller to the
highlighted variable. The controller’s value is
takenatthecurrenttimeplusthevariable’sTick
Offset.
Assign Controller—Lets you assign a track to the
highlighted variable.
Assign Node—Lets you assign a node to the
highlighted variable.
Ex press ion tex t f iel d—Enter the scr ipt expression
here to calculate the controller value.
Description text field—Enter comments regarding
the functionality of the controller.
Loa d/Sa ve—Load and save scripts to text files.
Debug—Opens the Script Controller Debug
Window, which displays the value of all variables
used in your script.
Eva luate—Evaluate s the scr ipt expression. The
evaluation is computed for the curren t position
of the time slider.
Clo se—Compiles and checks the controller script
for errors. If no errors are found, the dialog is
closed. Any problems result in a query box asking
whether you want to revert the expression to the
original value of the current t rack and close the
dialog (OK), or to return to editing the expression
(Cancel).
Smoot h R ota tion Contr oller
Main toolbar > Curve Editor (Open) > Select a rotation
track in the Tr ack View hierarc hy. > Track View menu bar
> Controller menu > Assign > Smooth Rotation
Graph Editors > Track V iew – Curve Editor > Select a
rotation track in the Track View hierarchy. > Track View
menu bar > Controller menu > Assign > Smooth Rotation
Animation menu > Rotation controllers > Sm ooth
Use Smooth Rotation when yo u want rotation to
have a smooth and natural look. Smooth rotation