EasyManua.ls Logo

Adobe AFTER EFFECTS 7.0 - Arrays

Adobe AFTER EFFECTS 7.0
684 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ADOBE AFTER EFFECTS 7.0
User Guide
565
The default global object for any expression is the layer on which the expression is written. For example, if you add
an expression to the Scale property of Layer A and you want the expression to return Layer As Position property’s
values, you can use any of the following expressions, as they are equivalent:
thisComp.layer("Layer A").position
thisLayer.position
position
To retrieve values from an object other than the layer containing the expression, insert the object in the expression.
For example, if you write an expression on Layer A and you want to retrieve position values from Layer B, use the
following expression:
thisComp.layer("Layer B").position
See also
About animation and layer properties” on page 188
Arrays
An Array is a type of object that stores an ordered set of numbers. An Array is represented as a list of numbers
separated by commas and surrounded by brackets, as in this example:
[10, 23]
You can assign an Array to a variable, making it easy to refer to Array values in other areas of the expression. For
example:
myArray = [10, 23]
The dimension of an Array is the number of elements in the Array. The dimension of myArray is 2. Different
properties in After Effects have different dimensions depending on the number of value parameters they have. In the
expression language, properties’ values are either single values (Numbers) or Arrays.
The following table provides examples of some properties and their dimensions:
You can access the individual elements of an Array by using brackets and an index number to indicate which element
you want. The elements in an Array are indexed starting from 0. Using the previous example,
myArray[0] is 10 and
myArray[1] is 23.
The following two expressions are equivalent:
Value type Value dimensions
1D Rotation ˚
Opacity %
2D Scale [x=width, y=height]
Position [x, y]
Anchor Point [x, y]
3D Scale [width, height, depth]
Position [x, y, z]
Anchor Point [x, y, z]
4D Color [red, green, blue, alpha]

Table of Contents

Related product manuals