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

Is it possible to detect which items are selected in the project panel?

Enthusiast ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

Is it possible to detect which items are selected in the project panel?

Looking the equivalent of TimelineClip.isSelected() command but for items in the project panel.

TOPICS
SDK

Views

692

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 , Jan 25, 2018 Jan 25, 2018

Panels can currently get notified whenever the project selection changes, but (as you've found) there is no current way to get or set the selection. I can make no specific commitments, but this is a highly requested feature near the top of our API backlog.

Votes

Translate

Translate
Engaged ,
May 02, 2017 May 02, 2017

Copy link to clipboard

Copied

Nope, no way to do that as yet.

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
Explorer ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Looking for this as well.


Using

var projectItem = app.project.rootItem.children[0];

for testing, but I want to retrieve the currently selected projectItem.

var projectItem = app.project.rootItem.children.isSelected(); //or similar

Does not work, but would be nice if it did.

Would be nice with both a single item return, and a Collection, if several are selected, we should write our own exceptions.

Bruce Bullis​

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 ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Panels can currently get notified whenever the project selection changes, but (as you've found) there is no current way to get or set the selection. I can make no specific commitments, but this is a highly requested feature near the top of our API backlog.

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
Explorer ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

Thank you for your answer Bruce.

I think you can set the selection:

app.project.rootItem.children[0].select();


I think my current script is coming together, it searches through the timeline for shots with similar names. Just missing this bit to make it useable. Had an idea of stepping backwards through the most recently added projectItems, but its not very elegant.

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 ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

You're correct; I should have said "While you can select and deselect individual items, you can't get/set the current project item selection, at one go."

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
Explorer ,
Jan 25, 2018 Jan 25, 2018

Copy link to clipboard

Copied

LATEST

Ok, I came up with a slightly more demanding solution, but it might work for this specific use-case.

Always selecting the lastly added item to root in project:

var projectLen = app.project.rootItem.children.numItems - 1;

var projectItem = app.project.rootItem.children[projectLen];

Which demands "constant cleaning", where the user puts away clips in bins after they are "placed" in the timeline, but it might be usable.

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