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

Table of Contents

Advertisement

Adobe After Effects Help
Using Help
|
Contents
10 Click outside of the expression to activate it.
Expression values
The value of an expression is the value of the last statement evaluated. For example, in the
following expressions the results are the same:
x = rotation * 10; [x, 20]
[rotation * 10, 20]
Expression time
Time within an expression is always measured in seconds. The default time for any
expression is the current composition time at which the expression is being evaluated. The
following expressions both use the default composition time and return the same values:
this_comp.layer(1).position
this_comp.layer(1).position.value_at_time(time)
To use a relative time, add a time value to the "(time)" argument. For example, to get a
value at a time 5 seconds before the current time, use the following expression:
this_comp.layer(1).position.value_at_time(time-5)
Expression time in nested comps
Default time references to properties in nested compositions use the original default
composition time, not remapped time. However, if you use the "source" function to
retrieve a property, the remapped time is used.
For example, if the source of a layer in the parent composition is a nested composition,
and in the parent composition you have remapped time, when you access the position
values of a layer in the nested composition with the following expression, the position
values use the composition's default time:
comp("nested comp").layer(1).position
However, if you access layer 1 using the "source" function, the position values use the
remapped time:
source.layer(1).position
Note: If you use a specific time in an expression, After Effects ignores the remapped time.
Numbers and arrays
Arrays represent multidimensional values in expressions. The value of each property in an
expression is a single number or Boolean value for values such as opacity, or an array for
2D, 3D, or 4D values such as position or "bg_color" . Many properties in After Effects, such as
position, scale, and color, have more than one value parameter and thus are represented
by different dimensions of arrays. For example, position is represented as a 2D or 3D array
because the Position property can have 2 [x, y], or 3 [x, y, z] parameter values. Colors are
represented as 4D arrays, [r, g, b, a]. Values in a color array range from 0 (black) to 1 (white).
The members of an array are always separated by commas. For example, the
Note:
expression [10, 20] sets the property's x value to 10 and y value to 20.
Indexing vectors and arrays
Indexing is a way of retrieving values in vectors and arrays. Vector and array indexing starts
from 0—for example:
Using Help
|
Contents
|
Index
|
Index
Creating Expressions
Back
251
Back
251

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents