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

ExtendScript(Extensions in Visual Studio Code) & premiere pro(ver15.2) add a text object

New Here ,
Jun 27, 2021 Jun 27, 2021

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');

 

 

TOPICS
SDK

Views

327

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

New Here , Jun 27, 2021 Jun 27, 2021

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
...

Votes

Translate

Translate
New Here ,
Jun 27, 2021 Jun 27, 2021

Copy link to clipboard

Copied

LATEST

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.

Votes

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