You can use animation layers with constraints and expressions to drive objects in your scene. For information on adding constraints to animation layers, see Add constraints to animation layers.
Note that the workflow for adding expressions to animation layers is more complex and includes some known limitations. (See Known limitations for animation layers and constraints.)
To set up an expression to drive an object with layered animation, you must locate the layer’s blend node that corresponds to the attribute you want to be driven. You then set up the expression to drive the inputB attribute of that blend node.
This example describes how to add an expression to the translateY attribute of an object with layered animation.
To create an expression that drives layered animation
The next steps describe how to add an expression to AnimLayer1 in order to drive the sphere’s translateY attribute.
This is the blend node that corresponds to the sphere’s translateY attribute.
For example, to add a sine function that drives the sphere’s translateY value, enter the following:
pSphere1_translateY_AnimLayer1.inputB = sin(time);
(See also Creating animation expressions.)
The expression you write for the inputB attribute now drives the sphere’s translateY animation on AnimLayer1. The example expression makes the sphere move up and down following a sine wave that varies with time.
Note the following known limitations and workarounds when using animation layers with constraints and expressions.
Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License