Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


getProjectViewSelection, but for Bins

Community Beginner ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Is there something similar to getProjectViewSelection, but for Bins? I wrote a script that places the selected clips into the active sequence, but it only works if you're in the root Project pane. Most people try and use it from Bins but I can't figure out a way to capture the selected clips in a Bin.

TOPICS
SDK

Views

63

Likes

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 , Aug 06, 2021 Aug 06, 2021
Try this, in PPro 15.4: var selection = app.getCurrentProjectViewSelection();   

Likes

Translate

Translate
Adobe Employee ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

getProjectViewSelection() will retrieve the current selection in the given project view, across all bins. 

Once you have the resultant list of projectItems, you can check the parent bin of each projectItem to see whether it's in a bin in which you're interested. 

[Let me know if I've misunderstood your question.]


Likes

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
Community Beginner ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Sorry, I might not have been very clear. Here are a couple images that may help:

Project Pane.jpgBin Pane.jpg

In the first, I have the Project pane open, with the folders/bins twirled down to the footage. In the second, I have the Bin pane open with the same footage selected.

 

getProjectViewSelection() will return an array of the selected clips in the Project pane, even if the Bin pane is active with a different set of clips selected. So basically I need to determine which pane was last active (because focus will shift to my extension pane) and get the selected clips from that pane, whether it's the Project pane, or a Bin pane.

Likes

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 ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Try this, in PPro 15.4:

var selection = app.getCurrentProjectViewSelection(); 

 

Likes

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
Community Beginner ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

Wow, that's it! Thank you!!

 

How far back does this work? Just need to update the manifest to reflect. CEP 10/11? PPRO 15.0, or only starting with 15.4?

Likes

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
New Here ,
Aug 06, 2021 Aug 06, 2021

Copy link to clipboard

Copied

LATEST

This method was introduced in 15.1 if I recall correctly. CEP10 should work fine. 

Likes

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