User Manual

Table Of Contents
Performing Calculations
in Parameter Fields
You can enter simple mathematical equations directly in a number field to calculate a desired
value. For example, typing 2.0 + 4.0 in most number fields will result in a value of 6.0. This can
be helpful when you want a parameter to be the sum of two other parameters or a fraction of
the screen resolution.
Using SimpleExpressions
Simple Expressions are a special type of script that can be placed alongside the parameter it is
controlling. These are useful for setting simple calculations, building unidirectional parameter
connections, or a combination of both. You add a SimpleExpression by entering an equals sign
directly in the number field of the parameter and then pressing Return.
Entering an equals sign opens the
SimpleExpression field with Pick Whip control.
An empty field will appear below the parameter, and a yellow indicator will appear to the left.
The current value of the parameter will be entered into the number field. Using Simple
Expressions, you can enter a mathematical formula that drives the value of a parameter or even
links two different parameters. This helps when you want to create an animation that is too
difficult or impossible to set up with keyframing. For instance, to create a pulsating object, you
can use the sine and time functions on a Size parameter. Dividing the time function can slow
down the pulsing while multiplying it can increase the rate.
A SimpleExpression using the sine and time functions.
Inside the SimpleExpression text box, you can enter one-line scripts in Lua with some Fusion-
specific shorthand. Some examples of Simple Expressions and their syntax include:
Expression Description
time
This returns the current frame number.
Merge1.Blend
This returns the value of another input, Blend,
from another node, Merge1.
Merge1:GetValue(Blend, time-5)
This returns the value from another input, but
sampled at a different frame, in this case five
frames before the current one.
sin(time/20)/2+.5
This returns a sine wave between 0 and 1.
Chapter – 63 Using Modifiers, Expressions, and Custom Controls 1268