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

Is there a way to get selected track items all at once in Premiere Pro API?

Explorer ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

Hello,
I'm having trouble developing a script in Premiere Pro. I'm asking because I couldn't find a solution by searching.

 

Is there a way to get all selected track items in a Premiere Pro sequence at once?

For example, is it possible to get selected track items at a similar speed to selectedLayers in Adobe After Effects?

 

There are workarounds like trackItem's isSelected() method, but it's too slow to use in real-time as accessing one selected clip requires evaluating true/false for the entire track's track items.

From what I've searched, there doesn't seem to be a way around this in the current script.

 

If it can't be solved at the script level, is there a way to solve it in the Premiere Pro Plugin SDK (C++)?

 

Requires the same properties or methods as selectedLayers in Adobe After Effects. Is there a quick way to get the index of the track and the index of the selected track item?

Developers, I would appreciate it if you could tell me that this is impossible if it is in an impossible form.

 

If you want to solve this problem, but it is not possible, you want to limit functionality or stop developing the tool.

 

Please help me~

TOPICS
SDK

Views

698

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 , Jul 01, 2021 Jul 01, 2021

The isSelected() method isn't a work-around; it's provided for exactly this purpose. 

I'm not sure how one would evaluate all trackItems, without evaluating each trackItem...?

There is no C++ API around track item selection.

 

 

Votes

Translate

Translate
Adobe Employee ,
Jul 01, 2021 Jul 01, 2021

Copy link to clipboard

Copied

The isSelected() method isn't a work-around; it's provided for exactly this purpose. 

I'm not sure how one would evaluate all trackItems, without evaluating each trackItem...?

There is no C++ API around track item selection.

 

 

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
Contributor ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

I have the same question-- iterating across ALL track items and checking isSelected() is a very clunky workflow.

Is this the best practice for accessing the currently selected track item? 

 

For example, I have a MOGRT selected on my timeline. It is the only track item selected in the entire timeline. What is the fastest way to change this MOGRT track item's properties?

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 ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

Is this the best practice for accessing the currently selected track item?

Yes.

You can also register a function to be called whenever the sequence selection changes; see PProPanel's onActiveSequenceSelectionChanged().


>...I have a MOGRT selected on my timeline. It is the only track item selected in the entire timeline. What is the fastest way to change this MOGRT track item's properties?

 

If you already know which trackItem is your .mogrt, then current selection doesn't matter; you can just operate on the .mogrt's trackItem's properties. 

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
Contributor ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

That's the thing-- I know which track item is selected because I manually clicked it in the UI. I don't know it's index though. So I can't "access" it without iterating through the entire track and checking if it is selected... right?

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 ,
May 04, 2023 May 04, 2023

Copy link to clipboard

Copied

LATEST

No, happily, that's not the case. 

You had said you knew which was selected; I mistakenly assumed you meant you knew it at the API level, not the UI level.

If your panel registers an onActiveSequenceSelectionChanged() function, it'll get sent a list of selected items, whenever the selection changes.

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