Reputation: 33
When coding a Premiere Pro Panel in Adobe Extendscript I can import a MOGRT file and set the value for sliders using the below code:
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);
However, when I try to check/uncheck a checkbox value in the MOGRT after import, the same bit of code does not work????
components.properties.getParamForDisplayName("Checkbox Value").setValue(false);
Any ideas as to why or how to change the value of the check boxes???
Upvotes: 1
Views: 584
Reputation: 88
It seems you are missing the second parameter '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.
Upvotes: 1