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

How to get the list of project items which are part of the active sequence?

Participant ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

Is there any way to get the list of project items which are part of the active sequence? I couldn't find such example at: Samples/Premiere.jsx at master · Adobe-CEP/Samples · GitHub

Premiere Pro version: 12.0.1

Extension Type: Panel

Thanks & Regards.
Meet Tank

TOPICS
SDK

Views

1.5K

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

Adobe Employee , Mar 13, 2018 Mar 13, 2018

There isn't sample code to do that.

Meticulous method: Walk every clip on every track, and make a record of the projectItem to which each clip refers.

Brute force method: Save the sequence as a new project, and it'll contain any/all projectItems referenced in the sequence.

As is so often the case, I prefer the brute force approach.

Votes

Translate

Translate
Adobe Employee ,
Mar 13, 2018 Mar 13, 2018

Copy link to clipboard

Copied

There isn't sample code to do that.

Meticulous method: Walk every clip on every track, and make a record of the projectItem to which each clip refers.

Brute force method: Save the sequence as a new project, and it'll contain any/all projectItems referenced in the sequence.

As is so often the case, I prefer the brute force approach.

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
Participant ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

Thanks for the quick response Bruce Bullis. Could you please elaborate more on the Brute force method? How to save the sequence as a new project? Can it be done using the Premiere Pro SDK or through Premiere Pro UI? And how to iterate through the project items after saving it as a new project?

Thanks,
Meet

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
Adobe Employee ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

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
Participant ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

Thanks Bruce. However we don't want to export the sequence as a new project. Regarding the Meticulous method: "Walk every clip on every track". Did you mean walk through every track including audio and video?

Thanks,
Meet

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
Adobe Employee ,
Mar 15, 2018 Mar 15, 2018

Copy link to clipboard

Copied

I'm curious why you're averse to exporting the sequence...?

Even if you don't use the exported project for anything, exporting it will give you a project containing all the media referenced in that sequence, and only the media referenced in that sequence. Isn't that exactly the information you need?

Yes, for the meticulous method, you'd need to walk across every clip on every track, to identify its corresponding projectItem.

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
Explorer ,
Mar 19, 2018 Mar 19, 2018

Copy link to clipboard

Copied

LATEST

How do you want the output? Im unsure of how to write this to an external file, or the clipboard or similar...
To walk every clip in the videotracks, you can use this:

app.enableQE();

       var activeSequence = app.project.activeSequence;

          var videoTrackNum = activeSequence.videoTracks.numTracks;

          var result = "";

                    for (var j = videoTrackNum - 1; j >= 0; j--){

                         //walk each track

                     var videos = activeSequence.videoTracks.clips;

                      var arrayLength = videos.numItems;

                        

                            for (var i = 0; i < arrayLength; i++){

                                  //walk each clip

                                var clip = videos;

                                var projectItem = clip.projectItem ;

                                   result += projectItem.name + ", ";

                            

                               

                                }

                        }

alert (result);

This script will produce duplicates, if youve used a project-item twice in the sequence, and will maybe not count the last clip in the tracks? Dont know, havent debugged it.

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