MOGRT 中的 Premiere Pro Extendscript 复选框选择
Premiere Pro Extendscript checkbox selection in MOGRT
在 Adobe Extendscript 中编写 Premiere Pro 面板时,我可以导入 MOGRT 文件并使用以下代码设置滑块的值:
var transition = app.project.activeSequence.importMGTFromLibrary("WARATAH TV", "WARATAH TV 2019-20 TRANSITION", (myStartTime - 0.55), 2, 2);
transition.setSelected(true);
var components = transition.getMGTComponent();
components.properties.getParamForDisplayName("Slider Value").setValue(5);
但是,当我尝试在导入后 check/uncheck MOGRT 中的复选框值时,同样的代码不起作用????
components.properties.getParamForDisplayName("Checkbox Value").setValue(false);
关于为什么或如何更改复选框的值有什么想法吗???
您似乎缺少第二个参数 'boolUpdateUI'...
setValue componentParam.setValue(newValue, boolUpdateUI)
Description
Obtains the value of the component parameter stream. Note: This can only work on parameters which are not time-variant.
Parameters
The newValue must be of the appropriate type for the component parameter stream; passing 1 for boolUpdateUI will force Premiere Pro to update its UI, after updating the value of the stream.
Returns
Returns 0 if successful.
在 Adobe Extendscript 中编写 Premiere Pro 面板时,我可以导入 MOGRT 文件并使用以下代码设置滑块的值:
var transition = app.project.activeSequence.importMGTFromLibrary("WARATAH TV", "WARATAH TV 2019-20 TRANSITION", (myStartTime - 0.55), 2, 2);
transition.setSelected(true);
var components = transition.getMGTComponent();
components.properties.getParamForDisplayName("Slider Value").setValue(5);
但是,当我尝试在导入后 check/uncheck MOGRT 中的复选框值时,同样的代码不起作用????
components.properties.getParamForDisplayName("Checkbox Value").setValue(false);
关于为什么或如何更改复选框的值有什么想法吗???
您似乎缺少第二个参数 'boolUpdateUI'...
setValue componentParam.setValue(newValue, boolUpdateUI)
Description
Obtains the value of the component parameter stream. Note: This can only work on parameters which are not time-variant.
Parameters
The newValue must be of the appropriate type for the component parameter stream; passing 1 for boolUpdateUI will force Premiere Pro to update its UI, after updating the value of the stream.
Returns
Returns 0 if successful.