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: - Start with a composition containing two solids: make layer 1 a circle named Light and layer 2 a rectangle named Dial.
- Create keyframes to animate the rotation of Dial.
- Select the Opacity property for Light and choose Animation > Add Expression. A default expression appears under the property.
- 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 - Press Enter on the numeric keypad or click outside of the expression to activate it.
- 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.
|