><

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.

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.


Creating Expressions > Creating expressions with the pick whip > An example of using the pick whip