Davinci Resolve / Fusion Expression 表達式 速查表
time
Current frame number of the fusion composition [fusion合成的當(dāng)前幀數(shù)]
time | time*3 (speed up) [加速]?| time/3 (slow down) [減速]

comp.RenderEnd
Length in frames of the fusion composition [fusion合成的總幀數(shù)]

sin()
Math function that returns -1 to 1 over time [太簡單,無須翻譯]
sin(time) = -1 to 1

abs()
Math function that always returns a positive value?[太簡單,無須翻譯]
abs(-42) = 42

floor()
Math function that always rounds a number down?[太簡單,無須翻譯]
floor(4.77) = 4

ceil()
Math function that always rounds a number up?[太簡單,無須翻譯]
ceil(4.77) = 5

iif()
Condition check that will return one of two different values.? iif(check,valueTrue,valueFalse) [根據(jù)不同的條件,返回不同的值? ?類似于if .. else .. 語句]
iif(time<40,333,444)
if time==30 this will return 333

min()
Returns the lesser of the 2 values [返回兩個值中較小的一個]
min(value1,value2)

max()
Returns the greater of the 2 values [返回兩個值中較大的一個]
max(value1,value2)

random(min,max)
Returns a random number between the min and max values [返回一個介于最小值和最大值之間的隨機數(shù)]
random(1,10)
Returns a random number between 1 and 10 [返回1到10之間的一個隨機數(shù)]

Point()
Expression that represents a position on the screen in x,y values [表示x、y值在屏幕上的位置]
Point(x,y)
Point(.5,.5) - Center of screen [屏幕中心? 注意:這里用的是相對值,屏幕長寬均為1]

Countdown Timer [倒數(shù)計時器]
Counts down from a set number of sections. Example below is for 24 frames per second. [從設(shè)定的節(jié)數(shù)開始倒數(shù)。下面的例子是每秒24幀。]
max(floor(60-(time/24)),0)
60=number of seconds for countdown [公式中的60代表要倒數(shù)的秒數(shù)]

Percent Complete [完成百分比]
Use this expression to get a value from 0 (start of composition) to 1 (end of composition).[使用這個表達式可以得到一個從0(合成開始)到1(合成結(jié)束)的值。]
time/comp.RenderEnd

os.date()
Returns the current date/time in a custom format. Replace the % values. [以自定義格式返回當(dāng)前日期/時間。用%來代替值]
os.date("today is %A, in %B")

Date/Time Variables
%a abbreviated weekday name (e.g., Wed)
%A full weekday name (e.g., Wednesday)
%b abbreviated month name (e.g., Sep)
%B full month name (e.g., September)
%c date and time (e.g., 09/16/98 23:48:10)
%d day of the month (16) [01-31]
%H hour, using a 24-hour clock (23) [00-23]
%I hour, using a 12-hour clock (11) [01-12]
%M minute (48) [00-59]
%m month (09) [01-12]
%p either "am" or "pm" (pm)
%S second (10) [00-61]
%w weekday (3) [0-6 = Sunday-Saturday]
%x date (e.g., 09/16/98)
%X time (e.g., 23:48:10)
%Y full year (1998)
%y two-digit year (98) [00-99]
%% the character `%′

Text Width/Height
Use expressions to create a rectangle mask that dynamically matches the width/height of the text [使用表達式創(chuàng)建一個動態(tài)匹配文本寬度/高度的矩形蒙版]
Width of Text1
(Text1.Output.DataWindow[3]-Text1.Output.DataWindow[1])/Text1.Output.Width
Height of Text1
(Text1.Output.DataWindow[4]-Text1.Output.DataWindow[2])/Text1.Output.Height

Node:GetValue()
Returns a property value at a specific time.[返回指定幀數(shù)處的屬性值]
Node:GetValue("Angle",time-30)
Returns the node angle property from 30 frames back [返回往前30幀處的節(jié)點的角度屬性值]
Node:GetValue("Center",time-30).Y
Returns the node Y position from 30 frames back [返回往前30幀處的節(jié)點Y位置的值]

comp:GetPrefs()
Returns information about the current composition[返回關(guān)于當(dāng)前合成的信息]
Frame Rate
comp:GetPrefs("Comp.FrameFormat.Rate")
Width
comp:GetPrefs("Comp.FrameFormat.Width")
Height
comp:GetPrefs("Comp.FrameFormat.Height")
翻譯了下,保留了英文,參考原文鏈接https://billjustice.com/fusion_expressions_cheat_sheet