EasyManua.ls Logo

Adobe AFTER EFFECTS 7.0 - Vector Math methods

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
567
Generally, it is best to use the name of a layer, effect, or a mask instead of a number to avoid confusion and errors if
the layer, effect, or mask is moved, or if the parameters are changed during product updates and upgrades. When
you use a name, always enclose it in straight quotes. For example, the first expression below is easier to understand
than the second expression, and the first expression will continue to work even if you change the order of effects:
effect("Colorama").param("Get Phase From")
effect(1).param(2)
You can create an expression that refers to just one value within the Array of a 2D or 3D property. By default, the first
value is used, unless you specify otherwise. For example, if you drag the pick whip from layer 1’s Rotation property
to layer 2’s Scale property, the following expression appears:
thisComp.layer(2).scale[0]
By default, the above expression uses the first value of the Scale property, which is width. If you prefer to use the
height value instead, drag the pick whip directly to the second value instead of the property name, or change the
expression as follows:
thisComp.layer(2).scale[1]
Conversely, if you drag the pick whip from layer 2’s Scale property to layer 1’s Rotation property, After Effects
automatically duplicates the expression so that two values are available for the scale. The following expression
appears:
[thisComp.layer(1).rotation, thisComp.layer(1).rotation]
To use a different value as one of the value parameters instead of doubling the one rotation value, remove the
duplicate expression and insert a value. For example, to use the rotation value for the scales height and 10 for the
width, you would create the following expression:
[thisComp.layer(1).rotation, 10]
Thevalueofanexpressionisthevalueofthelaststatementevaluated.Forexample,inthefollowingexpressions,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 compo-
sition time at which the expression is being evaluated. The following expressions both use the default composition
time and return the same values:
thisComp.layer(1).position
thisComp.layer(1).position.valueAtTime(time)
Tousearelativetime,addatimevaluetothetime argument.Forexample,togetavalueatatime5secondsbefore
the current time, use the following expression:
thisComp.layer(1).position.valueAtTime(time-5)
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
youhaveremappedtime,whenyouaccessthepositionvaluesofalayerinthenestedcompositionwiththefollowing
expression, the position values use the compositions 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:

Table of Contents

Related product manuals