Skip to main content
Inspiring
April 4, 2024
Answered

Whats the logic for Track matt key effect values for Matte: --Extend Script PPro

  • April 4, 2024
  • 1 reply
  • 562 views

whats the logic for changing track matt key effect values for Matte: how to set the track index , as it is not straight up entering track index!! i tried entering multiple index but the index is not representing the track and also it is not changing sometime

 

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(5);
    var prop = effect.properties[1];
    prop.setValue(2);
}
This topic has been closed for replies.
Correct answer Aditya27787857x0h7

also if  someone is not able to change the values for the "Matt:" property and looking for a solution check that your main sequence track names are not changed , that is :- like you manually renamed the track names in such cases also the value will not change even if you rename the track name back  to normal (not in my case"didnt tryed restart after rename method") , a workaround  way is to copy all the clips and paste in a new sequence and not to forget to use the "updateUI" param ......

1 reply

Bruce Bullis
Community Manager
Community Manager
April 5, 2024

Please provide a .prproj, and a snippet of ExtendScript, that make the problem plain. [Send to me directly, if you like.]

I notice you're not passing the second "updateUI" param to setValue; that can't be helping. 🙂

Aditya27787857x0h7AuthorCorrect answer
Inspiring
April 6, 2024

also if  someone is not able to change the values for the "Matt:" property and looking for a solution check that your main sequence track names are not changed , that is :- like you manually renamed the track names in such cases also the value will not change even if you rename the track name back  to normal (not in my case"didnt tryed restart after rename method") , a workaround  way is to copy all the clips and paste in a new sequence and not to forget to use the "updateUI" param ......

Inspiring
April 9, 2024

Also if you are using qe dom to add video  tracks then such video tracks are named incorectly and wont be recognised as a correct track index  by the api and will be hard to debug this slight overlook .....