Page 1 of 1

Scripting API: Returning name/ID of selected clip?

PostPosted: Thu Feb 18, 2021 10:43 pm
by Mel Matsuoka
I've been trying desperately to come up with a workaround for Resolve's infuriating lack of inheritance of clip properties when using the "New Timeline Using Selected Clips" option, and can't quite figure out how to use the Scripting API to simply return the selected Media Pool clip (or the selected Timeline clip), so that I can query its properties.

So far, all I can do is dump the properties of everything in the Media Pool, by iterating over the output of GetClipList(). But I cant figure out how to get the name/ID of whatever clip is currently selected in the Media Pool (and/or Timeline), so that I can isolate the properties of the selected clip using GetClipProperty()

Is this possible with the current API?

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Tue Jul 06, 2021 9:51 am
by sp-infected
Hello everyone,

But I cant figure out how to get the name/ID of whatever clip is currently selected in the Media Pool (and/or Timeline), so that I can isolate the properties of the selected clip using GetClipProperty()


We are currently facing the same problem.
Has anyone found a way to get the selected clips of a timeline? This would be extremly usefull for integrating Resolve in our pipeline.
Thank you for your help!

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Tue Jul 06, 2021 4:31 pm
by sp-infected
Maybe someone from Backmagic has a hint for me?

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Tue Jul 06, 2021 9:32 pm
by Igor Riđanović
Hi Mel. You can't get the selected items or clips. The closest you can do is GetCurrentVideoItem() called on the timeline instance. Unless you need to get completely arbitrary clips, perhaps you can filter the clips list and discard the ones that don't meet your criteria. That's what I often do.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Tue Jul 06, 2021 9:44 pm
by Mel Matsuoka
Igor Riđanović wrote:Hi Mel. You can't get the selected items or clips. The closest you can do is GetCurrentVideoItem() called on the timeline instance. Unless you need to get completely arbitrary clips, perhaps you can filter the clips list and discard the ones that don't meet your criteria. That's what I often do.


Thanks for the confirmation, Igor. That's incredibly disappointing. I can't imagine why there isn't a method for such an obvious thing?

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Wed Jul 07, 2021 1:30 pm
by Annaël Beauchemin
Mel Matsuoka wrote:
Igor Riđanović wrote:Hi Mel. You can't get the selected items or clips. The closest you can do is GetCurrentVideoItem() called on the timeline instance. Unless you need to get completely arbitrary clips, perhaps you can filter the clips list and discard the ones that don't meet your criteria. That's what I often do.


Thanks for the confirmation, Igor. That's incredibly disappointing. I can't imagine why there isn't a method for such an obvious thing?


+1

a "GetSelectedClips()" function that would return an array would be a big step forward for scripting in general.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Thu Jan 06, 2022 9:35 am
by X-Raym
+1

This is highly needed, for both media pool and timeline. Scripting without this basic feature is very limited.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Thu Jan 06, 2022 9:55 am
by Andrew Hazelden
+1

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Mon Feb 28, 2022 4:48 pm
by philipbowser
+1

I definitely need this as well for VFX Editorial and Conform workflows. Being able to run scripts on selected clips in the timeline is HUGE, and would be the reason we would switch over to Resolve.

a "GetSelectedClips()" function would allow us to make some tools that Resolve is currently lacking for VFX Conform.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Mon Feb 28, 2022 5:00 pm
by X-Raym
I think this thread has to be moved under Feature Request subforum by moderators.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Mon Feb 28, 2022 5:09 pm
by roger.magnusson
There already a feature request made here.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Mon Feb 28, 2022 5:11 pm
by X-Raym
@roger
Thx, I think a dedicated FR thread though would have been expected, there is two different sets of functions in this one :S
It worth to bump it though.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Mon Feb 27, 2023 6:04 pm
by pantau000
+1

Clips being selected/enabled and timelines being locked or not is an essential information needed for scripting.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Wed Apr 03, 2024 9:50 pm
by seb.reategui
Please add this feature.

Timeline.GetSelectedTimelineItems()

There is huge potential to change clip properties, run tasks on selected clips, update metadata and a myriad of other possibilities.

The timeline from a user perspective is a great place to select clips - you can see the clip preview, its name, its position in the timeline, it's the ultimate user control that gives you the feeling of "I know what this clip is". The thumbnail strip as well also affords this feeling.

So it is a no-brainer to permit scripts and Workflow Extensions to access the clips that the user has selected, so tasks can be performed on those clips.

The current API implementation only allows the clip underneath the playhead, or to get all timeline items.

This is not sufficient!

A user's selection can be of multiple clips located anywhere in the timeline, in a non-linear fashion.

In many cases, the user does NOT want to perform tasks to all clips in the timeline, this is too aggressive.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Wed Oct 02, 2024 7:21 pm
by Mel Matsuoka
It's Christmas in October!

"Scripting API support to get and set media pool selection" has been added to 19.0.2 !

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Wed Oct 02, 2024 7:24 pm
by bentraje
Will this include the "Timeline.GetSelectedTimelineItems()" as suggested above?

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Wed Oct 02, 2024 7:51 pm
by roger.magnusson
No, it's for media pool items only.

Re: Scripting API: Returning name/ID of selected clip?

PostPosted: Mon Jun 02, 2025 12:13 pm
by daxliniere
Hey DR dev team,
When will we get some movement on this, please? The lack of this basic functionality is holding back the scripting community. Go and visit the REAPER (DAW) forums and you will see the scripting community is very healthy and a great source of innovation.