Show in Contents
Add to Favorites
Home: Flint
Copying Nodes with Expressions
Working with Expressions in the Channel Editor
Operator Reference
Cascading Expressions
You can copy a single expression to multiple
channels that build on the result in the previous channel using
the SelectionOrder and CascadeChannel keywords.
These keywords increment the channel number or name as follows:
- Each
instance of SelectionOrder increments the channel number.
- Each
instance of CascadeChannel replaces the occurrence of the channel name
with the name of the preceding channel, relative to the order in which
the channels are selected.
In general, experiment with the SelectionOrder
and CascadeChannel keywords to determine which results are optimal
for your animation.
To
apply cascading expressions using SelectionOrder:
- Click
Animation to display the Animation controls.
- From
the Channel View box, select Info.
- Select
multiple channels to which you want to apply the cascaded expression,
in the desired order.
As you select each channel, the selection order
is shown next to the channel name in Info view.
TipTo select a range of channels, click the
first channel that you want to include in the range. Then click
the last channel to include in the range while holding Shift. To add to a range of files,
hold Ctrl or the
stylus button while selecting the channels from the Channel Editor.
- Enter
an expression that includes the keyword SelectionOrder.
Every instance of the keyword SelectionOrder
will be substituted in your expression by a different number for
each channel, which corresponds to the order in which you selected
them.
To
animate four channels using SelectionOrder:
- In Action,
add four axes named axis1, axis2, axis3 and axis4.
- Animate
axis1.position by creating a few keyframes.
- Select
the channels axis2.position, axis3.position and axis4.position in this
order.
- Enter
the following expression: eval(axis1.position, frame - 5 * SelectionOrder).
The following expressions are applied:
- axis1.position:
no expression
- axis2.position:
eval(axis1.position, frame - 5 * 1)
- axis3.position:
eval(axis1.position, frame - 5 * 2)
- axis4.position:
eval(axis1.position, frame - 5 * 3)
To
apply cascading expressions using CascadeChannel:
- Click
Animation to display the Animation controls.
- From
the Channel View box, select Info.
- Apply
an expression to a base channel to which the other channels will relate.
- Select
multiple channels, starting with the base channel, to which you want
to apply the cascaded expression, in the desired order.
- Enter
an expression that includes the keyword CascadeChannel.
The base channel (the first channel selected)
will remain unmodified. In the expressions for the other selected
channels, every instance of the keyword CascadeChannel will be substituted
by the name of the channel that preceded it, in the order in which
you selected them.
To
animate four axes using CascadeChannel:
- In Action,
add four axes named axis1, axis2, axis3 and axis4.
- Animate
axis1.position by creating a few keyframes.
- Select,
in this order, the channels axis1.position, axis2.position, axis3.position
and axis4.position.
- Enter
the following expression: eval(CascadeChannel, frame - 5).
The following are applied:
- axis1.position:
no expression
- axis2.position:
eval(axis1.position, frame - 5)
- axis3.position:
eval(axis2.position, frame - 5)
- axis4.position:
eval(axis3.position, frame - 5)
NoteThis results in the same animation as the
SelectionOrder example given above.