For the best experience, please use on a computer!
Jake Wipp's Expression Cheat Sheet!
This is a list containing most of the DaVinci Resolve Fusion expressions sorted into nice categories, descriptions on what they do, and helpful Copy buttons to make them easy to use! If you want to learn how to use expressions, scroll down to the bottom of the page for a helpful presentation!
Composition Settings
time
References the current frame of the composition
comp.RenderStart
References the first frame of the composition
comp.RenderEnd
References the last frame of the composition
comp:GetPrefs("Comp.FrameFormat.Width")
Returns the composition's width in pixels
comp:GetPrefs("Comp.FrameFormat.Height")
Returns the composition's height in pixels
comp:GetPrefs("Comp.FrameFormat.Rate")
Returns the composition's frame rate
Width divided by Height
Returns the aspect of the composition
Height divided by Width
Returns the inverted aspect of the composition
Math
min(x, y)
Returns the lowest value, add as many inputs as you want
max(x, y)
Returns the highest value, add as many inputs as you want
abs(x)
Always returns a positive value
floor(x)
Always rounds the number down
ceil(x)
Always rounds the number up
sin(x)
Returns the sine of the input
cos(y)
Returns the cosine of the input
tan(x)
Returns the tangent of the input
sqrt(x)
Returns the square root of the input
x^2
Returns the input to the power of 2
random(x, y)
Picks a random value between x and y (Only outputs whole numbers)
pi
Returns the value of pi
Logic
iif(2 > 1, x, y)
Returns X if statement is true else Y (Hover for all arguments)
(2 > 1 and x or y)
Returns X if statement is true else Y (Hover for all arguments)
Node Outputs
NodeName.Output.Width
Returns the node's horizontal resolution in pixels
NodeName.Output.Height
Returns the node's vertical resolution in pixels
NodeName.Output.DataWindow[1]
References the left side of a image (Uses DoD - Outputs Pixels)
NodeName.Output.DataWindow[2]
References the bottom side of a image (Uses DoD - Outputs Pixels)
NodeName.Output.DataWindow[3]
References the right side of a image (Uses DoD - Outputs Pixels)
NodeName.Output.DataWindow[4]
References the top side of a image (Uses DoD - Outputs Pixels)
Auto Calculate Width
Returns the width of a node using DoD
Auto Calculate Height
Returns the height of a node using DoD
Node Reference
self.Control
References a value in the same node as your expression
NodeName.Control
Returns the value of the control
NodeName.Control.X
Returns the X or Y value of a point control.
NodeName:GetValue("Control")
Returns the value of the control
NodeName:GetValue("Control", time-5)
Returns the value of the control at a specific time
NodeName:GetValue("Control").X
Returns the X or Y value of a point control.
Text
Text1.StyledText.Value
Returns the text as a string
..
Merge's multiple strings together
Text("Hello")
Outputs the text as a string
Text("#" .. time)
Merge's text with expressions
string.len(Text1.StyledText.Value)
Returns the length of a string
Counts the contents of a string (Hover for more info)
Counts certain values in a string of text. Replace %a with variable.
Want to learn about expressions?
Check out my ResolveCon 2024 presentation where I dive into the world of Fusion expressions!