Add track matte effect via CEP

New Here ,
Nov 17, 2020

Copy link to clipboard

Copied

Hey, I am working on a Premiere Pro plugin and wanted to know if it is possible to add a "Track Matte Key" effect using CEP or do I have to use the C++ framework? Kinda lost here.

TOPICS
Import, SDK

Views

115

Likes

Translate

Translate

Report

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

1 Correct Answer

Adobe Community Professional , Nov 17, 2020
justintaylor Adobe Community Professional , Nov 17, 2020
This is possible, but it requires using the QE Dom which is not offically supported by Adobe: app.enableQE(); var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0); var effect = qe.project.getVideoEffectByName("Track Matte Key"); clip.addVideoEffect(effect);

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Employee ,
Nov 17, 2020

Copy link to clipboard

Copied

There is no method for applying effects in PPro's supported ExtendScript API.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Nov 17, 2020

Copy link to clipboard

Copied

This is possible, but it requires using the QE Dom which is not offically supported by Adobe:

app.enableQE();

var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0);
var effect = qe.project.getVideoEffectByName("Track Matte Key");

clip.addVideoEffect(effect);




Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Nov 18, 2020

Copy link to clipboard

Copied

Hey Justin,

 

that's awesome! Will implement this in our plugin. Any idea how to set the video channel of the matte?

 

kind regards, andi

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Nov 18, 2020

Copy link to clipboard

Copied

Sure, just find the property and set the value with the number of the video track you want to set the matte to.

 

var clip = app.project.activeSequence.videoTracks[0].clips[0];
var effect;
for (var i = 0; i < clip.components.length; i++) {
    var component = clip.components[i];
    if (component.displayName == "Track Matte Key") {
        effect = component;
    }
}
if (component) {
    var prop = effect.properties[0];
    prop.setValue(4);
}

 

Likes

Translate

Translate

Report

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