Commonly Used Attributes And Methods; The Hasparent Attribute; The Name Attribute; Layer Space Transform Methods - Adobe AFTER EFFECTS 7.0 Manual

Table of Contents

Advertisement

t hisC omp.layer("nested comp").s ourc e.layer(1).p osit ion
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
attribute to determine if a layer has a parent. You can use this attribute even if there isn't a parent
hasParent
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:
idx = index;
if (hasParent) {
i d x = p arent . i nd e x ;
}
t hisC omp.layer(idx).p osit ion.wig g le(5, 20)

The name attribute

Use the
attribute with Comp, Footage, Layer, Mask, and Effect objects when you want to apply the same
name
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 "
amp = 2 0 ;
if (name == "hero") {
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
ADOBE AFTER EFFECTS 7.0
":
hero
568
User Guide

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents