Text Expressions


You can add an expression to the Source Text property of a Text Layer by Option (Alt) clicking its stopwatch. If you then change the default expression to "hello" (you must include the quotation marks), the text on the Text layer will change to "hello" (without the quotation marks.

By using text expressions, you can output any property value to the Comp window. This is a useful technique for debugging complex expressions.

Try this: Add a text layer. (It doesn't matter what text you use).

Twirl open the Text Layer in the Timeline as well as its Text and Transform property groups.

Option (Alt) click the stopwatch by the Source Text property.

Change the default expression to:

"X="+

but don't finalize the expression yet.

Grab the Pickwhip tool and use it to click the Text Layer's X Position value.

Now add the following text onto the end of the expression:

+"Y="+

So far, the expression should read "X="+position[0]+"Y="+

Pickwhip the Y Position value and finalize the expression by deselecting the layer or clicking Enter on the numeric keypad. The final expression should read as follows :

"X="+position[0]+"Y="+position[1]

Now try dragging the text layer around in the comp window (or animating it to move it around).

click to expand



After Effects On the Spot[c] Time-Saving Tips and Shortcuts from the Pros
After Effects On the Spot[c] Time-Saving Tips and Shortcuts from the Pros
ISBN: 1578202396
EAN: N/A
Year: 2006
Pages: 447

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net