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.
Try this, in PPro 15.4:
var selection = app.getCurrentProjectViewSelection();
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.]
Copy link to clipboard
Copied
Sorry, I might not have been very clear. Here are a couple images that may help:
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.
Copy link to clipboard
Copied
Try this, in PPro 15.4:
var selection = app.getCurrentProjectViewSelection();
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?
Copy link to clipboard
Copied
This method was introduced in 15.1 if I recall correctly. CEP10 should work fine.