Get 30+ hr of DaVinci Resolve courses & 400+ pre-made assets

As little as \$15/month for all courses and pre-made assets

When building out animations especially complex animations it’s great to avoid making hundreds of keyframes when possible and that’s where Fusion Expressions come in. In fusion we’re going to be focused on building the Fusion expressions in a coding language called LUA. Think of this lua code as a way to tell each of the node inputs what to do for each frame very similar to keyframes.

## Inputting expressions

Right clicking on any node input will give you a drop down in this list you will see the option for expressions.

Inside this expressions box you can use lua, math equations, or point to other Fusion input values of a similar type.

## Getting values from another nodes.

For most values you’re going to first have the notes name followed by a period and the inputs name. When working with multi-value inputs such as X Y inputs this changes slightly.

For an example let’s use a rectangle mask. The name of this rectangle mask node is going to be Rectangle1.

If we wanted to use the width input for an expression we would write out

``Rectangle1.Width``

But if we wanted to use the Y value from the rectangle mask we would need to write out the expression slightly differently since this input has two values.

``Rectangle1.Center.Y``

## Fusion Expressions Shorthand

Fusion composition start and end

``comp.RenderStart``
``comp.RenderEnd``

Explanation return the starting frame number or end frame number

Current frame number

``time``

Explanation time in fusion is counted in frame number

if-then else

``iif(Merge1.Blend == 0, 0, 1)``

Explanation if Merge1 Blend value equals 0 then return a 0 else return a 1

Point is for two values for a XY location

``Point(value1, value2)``

Explanation Create a location on screen with X(value1) and Y(value2)