Skip to main content
Andrew56s
Participant
January 25, 2016
Answered

Delete sequence in Premiere Pro using ExtendScript

  • January 25, 2016
  • 1 reply
  • 1971 views

My work is almost done, but there is one simple question, how to delete the sequence using ExtendScript?

In my script I can clone it, rename, move new footages, pictures, wav's etc., but I can not delete it.

In Data Browser (ExtendScript) there's app.project.deleteSequence(), but what are the arguments for this function? I know about QE and I found just one thread about it (https://forums.adobe.com/thread/1977423?start=0&tstart=0), there's no answer how it works. For many years I'm waiting for the manual for Pr like an After Effects Scripting Guide=(


In my project there is a sequence I need to make a copy, create some footages and titles, then rename cloned sequence, export it as Premiere Pro project and delete from this one. Everything works perfect except the last one.

This is the part of code:

app.project.activeSequence.clone(); // create "old_seq copy" from "old_seq"

var nI = app.project.rootItem.children.numItems;

for (var i = 0; i < nI; i++)

      {

         if (app.project.rootItem.children.name == "old_seq copy")

            {

              var item = app.project.rootItem.children

                     item.name = "new_seq";

             }

       }

--------------------------------------------------------------

/*--*/

for (var i = 0; i < nI; i++)

      {

       if (app.project.rootItem.children.name == "new_seq")

           {

             app.project.deleteSequence(); //<--- this is just an example of the line, but how to delete "new_seq"?

            }

       }

I found nothing about it in PProPanel. Is it possible at all?

Thank you!

This topic has been closed for replies.
Correct answer Bruce Bullis

There is no Scripting Guide planned, for PPro. Potentially comforting: there are >140 panels in use today that rely on PPro's ExtendScript API, and none of them had documentation either.

It is not possible, at all. Next-best thing: move old sequences into a bin you create, named something like "Andrei_says_to_delete_these".

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
January 26, 2016

There is no Scripting Guide planned, for PPro. Potentially comforting: there are >140 panels in use today that rely on PPro's ExtendScript API, and none of them had documentation either.

It is not possible, at all. Next-best thing: move old sequences into a bin you create, named something like "Andrei_says_to_delete_these".

Andrew56s
Andrew56sAuthor
Participant
January 26, 2016

Thank you,bbb_999! I try to do this. PProPanels is really helpful thing, but sometimes it seems you're deadlocked, and there's no way to solve the task.

Another way: close document without saving, and re-open it with basic structure (after exporting new seq to a .prproj). It works. But script creates about 1000 new sequences, and I don't know what is better for prefomance: collect them into a bin "Andrei_says_to_delete_these" or re-open document everytime.

Bruce Bullis
Legend
January 26, 2016

Could you describe the whole workflow, from the user's perspective? [mail might be better; b b b at adobe dot com]