Animate with expressions

An expression is a formula that calculates a property's value on each frame. Use one to animate a property without setting individual keyframes.

Use an expression for motion defined by a rule, such as an oscillation or a value that increases over time. You can also use an expression to link one property to another. To adjust motion by hand, use keyframes. See Keyframe Animation.

The open expression editor with its parts labeled: the pick whip, the mini-console, the code editor, and the Expression button.
The open expression editor: the pick whip and mini-console sit above the code editor, and the Expression (fx) button in the header enables it.

Where expressions live#

Each animatable property in the keyframe panel has an Expression section labeled with its name. Expand the section to access the code editor, result preview, and pick whip.

Type your formula into the code editor. As you type, the mini-console above it previews the result: it shows = followed by the current evaluated value, "No expression" when the field is empty, or an error message if the formula can't be parsed. Because the value is evaluated at the current time, scrubbing the playhead (the current-time indicator) updates the preview.

The expression mini-console showing a property's live evaluated value.
The mini-console previews the current evaluated value.

To apply the expression to the property, click the fx button. Clicking fx again disables the expression and returns the property to its keyframed values. The formula stays in the editor, so you can re-enable it later.

Click the Expression header again to collapse the section.

Note

The fx button becomes available only once the editor contains an expression. An empty field leaves it inactive.

Use the pick whip to insert a reference to another property's value.

  1. In Sequence, expand the Expression section for the property you want to drive.
  2. Click in the code editor where the reference should go.
  3. Drag from the pick-whip icon (its tooltip reads Pick whip) onto the property you want to reference. Sequence draws a line from the icon to your pointer as you drag.
  4. Release over the target property.

Sequence inserts a reference to that property into your expression. As the source property changes, the driven property follows.

Was this page helpful?