ExtendScript import effect preset file

Explorer ,
Jan 10, 2020 Jan 10, 2020

Copy link to clipboard

Copied

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

TOPICS
How to, Import, SDK

Views

405

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Employee , Jan 10, 2020 Jan 10, 2020
While the QE DOM remains officially unsupported, I seem to recall that you can use getVideoEffectByName() to get effect presets, by their name.

Likes

Translate

Translate
Adobe Employee ,
Jan 10, 2020 Jan 10, 2020

Copy link to clipboard

Copied

While the QE DOM remains officially unsupported, I seem to recall that you can use getVideoEffectByName() to get effect presets, by their name.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 10, 2021 Jul 10, 2021

Copy link to clipboard

Copied

I'm sorry ... I tried

```

clip.addVideoEffect(qe.project.getVideoEffectByName("Scale+ key"));
```
And it didn't work 


I have QE enabled but the preset effect that I tried to add didn't work... any idea how to get around this ?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Jul 11, 2021 Jul 11, 2021

Copy link to clipboard

Copied

LATEST

In the calling code, are you sure that the clip object is valid, and obtained from the QE DOM? 
Does "Scale+ key" appear as an entry, in the video effect list? 


var effectList = qe.project.getVideoEffectList();

What resuled is returned from getVideoEffectByName()? 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines