欢迎光临散文网 会员登陆 & 注册

Davinci Resolve / Fusion Expression 表达式 速查表

2023-06-30 23:56 作者:jhack79  | 我要投稿

time

Current frame number of the fusion composition [fusion合成的当前帧数]

time | time*3 (speed up) [加速] | time/3 (slow down) [减速]

comp.RenderEnd

Length in frames of the fusion composition [fusion合成的总帧数]

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) [根据不同的条件,返回不同的值   类似于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 [返回一个介于最小值和最大值之间的随机数]

random(1,10)
Returns a random number between 1 and 10 [返回1到10之间的一个随机数]

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 [倒数计时器]

Counts down from a set number of sections. Example below is for 24 frames per second. [从设定的节数开始倒数。下面的例子是每秒24帧]

max(floor(60-(time/24)),0)
60=number of seconds for countdown [公式中的60代表要倒数的秒数]

Percent Complete [完成百分比]

Use this expression to get a value from 0 (start of composition) to 1 (end of composition).[使用这个表达式可以得到一个从0(合成开始)到1(合成结束)的值。]

time/comp.RenderEnd

os.date()

Returns the current date/time in a custom format. Replace the % values. [以自定义格式返回当前日期/时间。用%来代替值]

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 [使用表达式创建一个动态匹配文本宽度/高度的矩形蒙版]

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.[返回指定帧数处的属性值]

Node:GetValue("Angle",time-30)
Returns the node angle property from 30 frames back [返回往前30帧处的节点的角度属性值]

Node:GetValue("Center",time-30).Y

Returns the node Y position from 30 frames back [返回往前30帧处的节点Y位置的值]

comp:GetPrefs()

Returns information about the current composition[返回关于当前合成的信息]

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

Davinci Resolve / Fusion Expression 表达式 速查表的评论 (共 条)

分享到微博请遵守国家法律