ExtendScript import effect preset file
Hi everybody!
I would like to know if it is possible to import an effect preset file (*.prfpset) via ExtendScript.
I already figured out how to add an effect to the effect controls of a clip/mogrt and set its properties, but it would be great to import the presets. When I try to import with any of the import/importFiles/... -functions, premiere shows something like "I do not like this file format".
(I use a dollar prefix so that these variables will be shown on top of the data browser in the toolkit...)
// add an effect to the effect controls of a clip/mogrt
$qeProject = qe.project;
$qeActiveSequence = $qeProject.getActiveSequence();
// V1
$qeVideoTrack = $qeActiveSequence.getVideoTrackAt(1);
// this is the clip/mogrt, note: there might an empty item after this one...
// the "normal" trackItem from the app.project will not allow adding an effect to its effect controls, but this one is from the qeDOM...
$qeItem = $qeVideoTrack.getItemAt(0);
// effect from current effect controls of this mogrt
$qeComponent = $qeItem.getComponentAt(0);
// add new effect to effect controls of this mogrt
$qeItem.addVideoEffect(this.qe.project.getVideoEffectByName("Basic 3D"));
This sample panel: https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/index.html only describes how to copy preset files...
The only thing I can imagine would be to manually load the xml of a preset file, parse it to json and fetch the preset settings from there to set them "manually" after adding the required effect(s). Would this be a good approach if importing via ExtendScript is not possible?
As an overview for what is available, I use this document: https://premiereonscript.com/wp-content/uploads/2018/03/Premiere-v12-Effect-Documentation.pdf.
Greetings,
Guntram
