
ADOBE AFTER EFFECTS 7.0
User Guide
568
t h i s C omp. l aye r ( “n e ste d c omp” ) . s ou rc e. l aye r ( 1 ) . p o s it i on
Note:
If you use a specific time in an expression, After Effects ignores the remapped time.
Commonly used attributes and methods
The hasParent attribute
Use the
h a s Pare nt
attribute to determine if a layer has a parent. You can use this attribute even if there isn’t a parent
layer at present. For example, the following expression indicates that the layer to which you apply it will wiggle based
on the position of the layer’s parent. If the layer has no parent, then it will wiggle based on its own position. If the
layer is given a parent later, then the layer’s behavior will change accordingly:
i d x = i n d e x ;
i f ( h a s Pare nt ) {
i d x = p are nt . i n d e x ;
}
t h i s C omp. l aye r ( i d x ) . p o s it i on . w i g g l e ( 5 , 2 0 )
The name attribute
Use the
name
attribute with Comp, Footage, Layer, Mask, and Effect objects when you want to apply the same
expression to several layers and vary the results based on the name of an object. For example, the following
expression wiggles the position of a layer differently if the layer is named "
h e ro
":
amp = 2 0 ;
i f ( n am e = = " h e ro " ) {
amp = 4 0 ;
}
w i g g l e ( 5 , amp )
Layer space transform methods
Use layer space transform methods to transform values from one space to another, such as from layer space to world
space. The “from” methods transform values from the layer’s space to the named space (comp or world). The “to”
methods transform values from the named space (comp or world) to the layer space. Each transform method takes
an optional parameter to determine the time at which the layer’s transform is computed; however, you can almost
always use the current (default) time.
Use “Vec” transform methods when transforming a direction vector, such as the difference between two position
values. Use the plain (non-”Vec”) transform methods when transforming a point, such as position. Comp and world
space are the same for 2D layers. For 3D layers, however, comp space is relative to the active camera, and world space
is independent of the camera.
See also
“Layer Space Transforms methods” on page 581
Summary of Contents for AFTER EFFECTS 7.0
Page 1: ...Chapter 1 User Guide...