Copy link to clipboard
Copied
I was able to add effects from ExtendScript in premiere pro
Could you please tell me if there is a way to add a text object?
var myClip = qe.project.getActiveSequence().getVideoTrackAt(1).getItemAt(0);
myClip.addVideoEffect(qe.project.getVideoEffectByName(“Mosaic”));
Also, I would like to delete the following text object, but if there is a case where "getComponentAt (4)" does not exist, the process will stop in the middle, so I would like to delete it if the object exists in the if statement. I don't know how to get the numItems of "getComponentAt", is there any good way?
for (i = 0; i < 10; i++){
var n = qe.project.getActiveSequence().getVideoTrackAt(1).getItemAt(i).getComponentAt(3).remove();
}
alert('end');
I feel bad. Was self resolved.
The cause was that I couldn't read the following document and VS Code debugging was temporarily not working properly. (It will recover when you restart.)
https://ppro-scripting.docsforadobe.dev/collection/trackitemcollection.html
I changed it to the following code and realized it.
var myClipNum = app.project.activeSequence.videoTracks[1].clips.numItems;
for (i = 0; i < myClipNum; i++){
var myClipComNum = app.project.activeSequence.videoTracks[1].clips[i].components.n
...
Copy link to clipboard
Copied
I feel bad. Was self resolved.
The cause was that I couldn't read the following document and VS Code debugging was temporarily not working properly. (It will recover when you restart.)
https://ppro-scripting.docsforadobe.dev/collection/trackitemcollection.html
I changed it to the following code and realized it.
var myClipNum = app.project.activeSequence.videoTracks[1].clips.numItems;
for (i = 0; i < myClipNum; i++){
var myClipComNum = app.project.activeSequence.videoTracks[1].clips[i].components.numItems;
qe.project.getActiveSequence().getVideoTrackAt(1).getItemAt(i).getComponentAt(3).remove();
}
Thank you very much.