Using Help | Contents | Index Back - Adobe AFTER EFFECTS 5.5 Help Manual

Table of Contents

Advertisement

Adobe After Effects Help
Using Help
|
Contents
n = n+1;
}
To prevent infinite loops, Motion Math stops a loop after 32,000 cycles. You can also stop a
loop by pressing the Escape key (Windows) or both the Command and . (period) keys (Mac
OS) while the script is running.
Constants (PB only)
Motion Math treats certain functions as constants for the duration of the work area.
Constants always return the same value in the same composition and work area. For
example, the constant comp_width obtains the width of the composition, which does not
vary. Because you cannot assign new values to constants, they can be used only on the
right side of an assignment. In the following example, the height of the composition is
assigned to the variable H1:
H1 = comp_height;
For a list of constants in Motion Math, see "Constants (PB only)" on page 331.
Math functions (PB only)
Motion Math provides a number of math functions, including logarithms, trigonometry,
and vector functions. Math functions always require variables or expressions in order to
obtain a value, using the following format:
function (variable)
Some math functions require vectors as variables, while others require integers or rational
numbers. For a list of math functions available in Motion Math, see "Math functions (PB
only)" on page 330. For more information about vectors, see "About vectors (PB only)" on
page 327.
Comments (PB only)
Use comments in scripts to describe or identify portions of the script. To insert a comment
in a line of script, precede it with two slash marks (/ /). Any characters appearing after the
two slash marks are ignored by Motion Math when you run the script. In the following
example, the comments appear on the same line as an assignment:
scale_factor = 1.0; // Increase or decrease scaling by editing the
number
Specifying layers and properties (PB only)
To specify a layer in a script, type its name as it appears in the Timeline window. If the
name contains a space, you must enclose the name in quotes. For example, the layer name
Red Boat must be specified as "Red Boat" in the script.
For functions that require a property, you can specify, by name, any of the following
default properties: mask feather, anchor point, position, scale, rotation, and opacity. When
specifying properties with two words, such as anchor point, enclose them in quotes, as
shown in the following example:
value (circle, "anchor point") = value (square, "anchor point") *
1.5;
Using Help
|
Contents
|
Index
|
Index
Using Motion Math (PB only)
Back
325
Back
325

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents