You use the expression language to access attributes and methods of layer properties. To access a value, use a chain of object references separated by the period (.) operator. To chain object references past the layer level (for example, to chain effect properties, masks, or text animators), you can also use parentheses. For example, to link the Opacity property in Layer A to the Gaussian Blur effect’s Blurriness property in Layer B, type the following expression in the expression field for Layer A’s Opacity property:
thisComp.layer("Layer B").effect("Gaussian Blur")("Blurriness")
The default object for an expression is the property on which the expression is written, followed by the layer containing the expression; therefore, you do not need to specify the property. For example, a wiggle expression written on a layer’s Position property can be either of the following:
wiggle(5, 10) position.wiggle(5, 10)
You do need to include the layer and property when retrieving them from outside the layer and property on which the expression is written. For example, an expression written on Layer B’s Opacity property, linking it to Layer A’s Rotation property would look like this:
thisComp.layer("Layer A").rotation
To see more examples of how this works, use the
pick whip to link one layer property to another, and look at the
expressions it creates.Jeff Almasol provides a script with which you can determine how to refer to any property in expressions:
http://www.redefinery.com/ae/view.php?item=rd_GimmePropPath
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/en_US/AfterEffects/8.0/WS3878526689cb91655866c1103906c6dea-7a35.html
Comments
Comments are no longer accepted for After Effects CS3. After Effects CS4 is the current version. To discuss After Effects CS3, please use the Adobe forum.