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

Looking for Index of Selected Sequence via SDK

Community Beginner ,
Jan 31, 2023 Jan 31, 2023

Copy link to clipboard

Copied

Hello, I am working on an extension that will clone the selected sequence in the project panel. I thought I was creating a working prototype, but then I realized I was using the "activeSequence" object which is not the object that I want. I want the selected sequence.

 

I found something similar to what I want, called "Anywhere.getCurrentEditingSessionSelectionURL()". But I just want this for a normal project object...not an "Anywhere" object. But otherwise, the Description and Return of this method are what I am looking for (I guess it would be an index instead of a URL though).

 

Can someone help me out with the best way to retrieve this information? Thank you.

TOPICS
SDK

Views

220

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 2 Correct answers

Adobe Employee , Jan 31, 2023 Jan 31, 2023

You can get the current projectItem selection, the parse that array looking for selected sequences...

What will you do, if the user has multiple sequences selected? 

[Without better understanding your desired workflow, the active sequence seems like exactly the right approach...]


 

Votes

Translate

Translate
Adobe Employee , Feb 01, 2023 Feb 01, 2023

Based on [above], yes, using the handy projectItem.isSequence() function, then the nodeId, is probably the best approach to identifying/picking sequences from a project panel selection.

Votes

Translate

Translate
Adobe Employee ,
Jan 31, 2023 Jan 31, 2023

Copy link to clipboard

Copied

You can get the current projectItem selection, the parse that array looking for selected sequences...

What will you do, if the user has multiple sequences selected? 

[Without better understanding your desired workflow, the active sequence seems like exactly the right 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
Community Beginner ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

Got it, so maybe the best way is to pull the nodeId from the selected projectItem and then loop through every sequence until I find one that has a matching projectItem nodeId? Is there a simpler way to get the sequence index from the projectItem?

 

For now, if multiple sequences were selected, I would throw an error.

 

My desired workflow is basically that I want a variation of duplicating a sequence in the project panel. This extension would allow the user to select a sequence in the project panel, hit the extension's duplicate button, and then the extension would duplicate the sequence and iterate on the edit number (sort of like how After Effects does it). I know it can seem arbitrary whether I use selected sequence or active sequence, but active sequence would be unintuitive for an editor (as you don't duplicate an active sequence, you duplicate a selected sequence).

 

Thank you Bruce, I appreciate the help.

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 ,
Feb 01, 2023 Feb 01, 2023

Copy link to clipboard

Copied

LATEST

Based on [above], yes, using the handy projectItem.isSequence() function, then the nodeId, is probably the best approach to identifying/picking sequences from a project panel 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