Copy link to clipboard
Copied
Hi,
I'm building an extension for Premiere and got stuck at this point. So basically, upon clicking on a certain button in extension I need it's corresponding sequence to get highlighted in the project window.
Here's a scenario:
I have a project opened in Premiere that contains 3 sequences and I also have my extension opened. Within extension there are 3 buttons for those 3 sequences in the project, each button corresponding to each sequence - Button X corresponding to Sequence X, Button Y to Sequence Y and Button Z to Sequence Z... When I click on the Button X in the extension window, I want it's corresponding Sequence X to get highlighted/selected for me in the project window.
If the Sequence X is located within a bin that's inside a bin, let's say Bin A1.1 is inside Bin A1 and there lies the Sequence X - I want those bins to get expanded upon clicking on the Button X so that I can see highlighted Sequence X in the project window - see example.
And that's pretty much it, I hope I explained my goal clearly.
So how would you do this? Can you throw me a few lines of code for this or a documentation or an idea of how to approach this? Anything would help really.
Thank you in advance!
For individual items use the projectItem.select() function. Here's an example:
app.project.activeSequence.projectItem.select()
If you want to set multiple items as selected you can use app.setProjectViewSelection(). However, in this method, you'll need to determine which project view you want to set the selected items in. In this example, I'm just using the first view.
...var projectItems = [app.project.activeSequence.projectItem];
var projectView = app.getProjectViewIDs()[0];
app.setProjectViewSelectio
Copy link to clipboard
Copied
For individual items use the projectItem.select() function. Here's an example:
app.project.activeSequence.projectItem.select()
If you want to set multiple items as selected you can use app.setProjectViewSelection(). However, in this method, you'll need to determine which project view you want to set the selected items in. In this example, I'm just using the first view.
var projectItems = [app.project.activeSequence.projectItem];
var projectView = app.getProjectViewIDs()[0];
app.setProjectViewSelection(projectItems, projectView);
Copy link to clipboard
Copied
It worked like a charm! Thank you.
One more question: What is the command for making a certain panel (project panel in particular) active? If I'm on the extension panel, project panel is not active - see example.
Upon clicking on the Button in extension panel, I want Project panel to become active so that I wouldn't have to switch on it manually to see the selected sequence.
Copy link to clipboard
Copied
There is no way to focus another panel with the current API, it's a good feature request though.
Copy link to clipboard
Copied
Hello Justin, I have one more question please.
I am successfully using these lines in Premiere 2019 - meaning I can select the sequence and the bins structure where this sequence is located expands accordingly - works like a charm! Although in Premiere 2018 12.1.0 - the sequence gets selected but unfortunately bins structure doesn't expand..
Is there any way to fix this? Or Premiere 2018 12.1.0 simply doesn't support this and there's no way to expand bins?
Thanks a lot in advance.