User Guide

Using Help | Contents | Index Back 247
Adobe After Effects Help Creating Expressions
Using Help | Contents | Index Back 247
To learn how to select a specific value in a vector or array, such as Positions y value, see
“Accessing specific values in a vector or array on page 252.
An example of using the pick whip
The following example shows how to use the pick whip to simulate dimming a light bulb
while rotating a dial.
Note: To learn what the text in an expression means, see “Understanding the expression
language” on page 249.
Linking opacity to rotation:
1 Start with a composition containing two solids: make layer 1 a circle named Light and
layer 2 a rectangle named Dial.
2 Create keyframes to animate the rotation of Dial.
3 Select the Opacity property for Light and choose Animation > Add Expression. A
default expression appears under the property.
4 Click the pick whip ( ) next to the Opacity expression and drag it to the Rotation
property for Dial. After Effects automatically fills in the following expression:
this_comp.layer("Dial").rotation
5 Press Enter on the numeric keypad or click outside of the expression to activate it.
6 Preview the animation. Notice that the Opacity property of Light is animated, yet there
are no opacity keyframes.
Note: Make sure to use Rotation values that are compatible with the Opacity property. For
example, Opacity values range from 0 to 100, so rotating the Dial layer backward using a
negative value results in an Opacity value of 0.
Editing a pick-whip expression
Once you use the pick whip to create an expression, you can perform simple edits to alter
the expressions effect. For example, you can add a scale factor to the expression to
increase or decrease the effect. To edit a pick-whip expression, type directly in the
expression field and then press Enter on the numeric keypad or click outside of the field to
activate it.
Modify a pick-whip expression by using simple math operations, such as the following:
+ (add)
- (subtract)
/ (divide)
* (multiply)
*-1 (perform opposite of original, such as counterclockwise instead of clockwise)
Using math functions that are a little more complex provide a high degree of flexibility. For
example, adding “/360*100” to an expression converts a parameter’s values that range
from 0 to 360, such as a dial, to values that range from 0 to 100, such as a slider.
Examples of edited pick-whip expressions
The following are examples of pick-whip expressions that have been altered with simple
functions. These expressions are easy to create and result in sophisticated effects that
would otherwise require dozens of keyframes.