Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Scripting - Adding effects

New Here ,
May 15, 2017 May 15, 2017

Using ExtendScript, I need to add a Lumetri Color effect to a clip and set the Input LUT to a specific file. I can see the ComponentCollection for the clip, and it looks like the effects are items in this collection. Is it possible to add new effects to a clip, and how do you set their parameters?

TOPICS
SDK
5.0K
Translate
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

Engaged , May 17, 2017 May 17, 2017

Agree with e.d.... manipulating the parameters of existing effects,  including Lumetri Color should be somewhat doable,  but am not sure if/how you can add the effect with the public API only? But in the QE DOM you can use the addVideoEffect method.

Re: Javascript API for premiere pro

Translate
Engaged ,
May 16, 2017 May 16, 2017

Hi,

while there are some ways to GET effect data (not all have yet been implemented), I have doubts you can (easily) SET them...

If that were the case, I believe Bruce Bullis​ would have updated the Sample Panel.

Translate
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
Engaged ,
May 17, 2017 May 17, 2017

Also see this thread, your question seems very similar to me. Guess you'll have to do some trial-and-error.

Translate
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
Engaged ,
May 17, 2017 May 17, 2017

Agree with e.d.... manipulating the parameters of existing effects,  including Lumetri Color should be somewhat doable,  but am not sure if/how you can add the effect with the public API only? But in the QE DOM you can use the addVideoEffect method.

Re: Javascript API for premiere pro

Translate
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
Explorer ,
May 20, 2018 May 20, 2018

Any chance anyone can shed a little more light on how to use the addVideoEffect() method in the admittedly "officially unsupported and not recommended" QE DOM? I've tried passing an effect's displayName, matchName, and a component object as an argument to the method and I get a "Bad argument list" message for each of those. Might someone know what arguments that method expects?

Thanks,

David

Translate
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
Community Beginner ,
Jul 16, 2018 Jul 16, 2018

Joining to this request for addVideoEffect() args

Translate
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
Community Beginner ,
Jul 16, 2018 Jul 16, 2018

Found out. addVideoEffect(this.qe.project.getVideoEffectByName("Twirl"))

Translate
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
Explorer ,
Jul 24, 2018 Jul 24, 2018

Thanks, that's really helpful!

Translate
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
Enthusiast ,
Jul 25, 2018 Jul 25, 2018

dmytrok98627988  wrote

Found out. addVideoEffect(this.qe.project.getVideoEffectByName("Twirl"))

Was able get the object for qe.project.getVideoEffectByName("Twirl")

How to apply addVideoEffect() to either

a trackItem, e.g. app.project.activeSequence.videoTracks[0].clips[0];

or

a projectItem, e.g. app.project.rootItem.children[0];

Translate
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
Explorer ,
Jul 25, 2018 Jul 25, 2018

I found this to work.

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0); // First item, first track

clip.addVideoEffect(this.qe.project.getVideoEffectByName("Crop"));

Translate
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
Enthusiast ,
Jul 25, 2018 Jul 25, 2018

eliportellhotmail.com  wrote

I found this to work.

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0); // First item, first track

clip.addVideoEffect(this.qe.project.getVideoEffectByName("Crop"));

Thanks eliportell@hotmail.com

Worked like a charm.  It was the getting of the track by mean of the "qe" project that made the difference.

Is the "this" on your second line a necessary object.   It worked for me without. What is "this" referring to?

Translate
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
Explorer ,
Jul 25, 2018 Jul 25, 2018

Premiopolis​ great point.

I was using the "this" because that is what was shared by dmytrok98627988​ and it worked, so I didn't question. Thanks to everyone's participation on this thread. Adding effects is a huge help.

Translate
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
Enthusiast ,
Jul 25, 2018 Jul 25, 2018

Are you able to programmatically set properties of the applied effect?  So far I haven't found a means to do so.

Translate
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
Explorer ,
Jul 25, 2018 Jul 25, 2018

This worked for me:

app.enableQE();

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0);

clip.addVideoEffect(qe.project.getVideoEffectByName("Crop"));

var clip = app.project.activeSequence.videoTracks[0].clips[0];

for (var a = 0;a<clip.components.numItems;a++){

    if( clip.components.displayName == "Crop"){

        clip.components.properties[0].setValue(30,1);

        clip.components.properties[1].setValue(20,1);

        clip.components.properties[2].setValue(12,1);

        clip.components.properties[3].setValue(10,1);

        clip.components.properties[5].setValue(25,1);

        }

    }

Referencing this effect documentation for property information. And here is a tutorial video as well.

Translate
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
Enthusiast ,
Jul 26, 2018 Jul 26, 2018

Eli Portell ​   ​Super helpful.  Thanks.

Translate
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
Community Beginner ,
Jul 08, 2021 Jul 08, 2021
LATEST

Looks good but instead of getActiveSequence how can work on any sequence with sequence number. 

Something like this - project.sequences[10]; 

But in QE it doesn't work. how to define Sequence 10 instead of active sequence? 

Translate
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
Participant ,
Oct 26, 2017 Oct 26, 2017

Hi ,

Did you get any update ? can we apply INPUT LUT to any clip?

Translate
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