2010

Table Of Contents
Note that the Attributes list displays Balls keyable, unlocked
attributesthe attributes youll most likely want to animate with an
expression. Use the scroll bar to see the entire list.
5 Enter this expression in the expression text area:
Type all characters exactly as shown above. Entries are case sensitive. The
semicolon (;) signifies the end of the expression statement. End each
statement in an expression with a semicolon.
An error message appears in the Script Editor and Command Lines
response area if the expression has incorrect syntax or typing mistakes.
6 Click Create to create the expression.
Creating the expression checks it for syntax errors and converts it to a
form Maya can execute when you return to the start time or play the
animation. Clicking this button also executes the expression for the
current frame.
The expression sets Balls scaleY attribute to the value of time + 1.
Ball.scaleY is the full name of the attribute. A period separates the name
of the object and attribute. Note that you must spell the object and
attribute with uppercase and lowercase letters as they appear in the
Expression Editors Objects and Attributes lists.
The word time is a commonly used predefined variable that updates as
an animation plays. It contains the elapsed number of seconds from the
first frame to the current frame. The value increases with the increasing
frame number.
At the default animation playback rate of 24 frames per second, time has
these values (rounded to four decimal places):
Time (seconds)Frame
00
0.04171
0.08332
628 | Chapter 12 Expressions