Lua API: SetClipProperty on MediaPool items of type timeline

Get answers to your questions about color grading, editing and finishing with DaVinci Resolve.
  • Author
  • Message
Offline
User avatar

metkat

  • Posts: 15
  • Joined: Sat Jun 01, 2019 2:35 am
  • Location: Seattle, Washington
  • Real Name: Russell Harmon

Lua API: SetClipProperty on MediaPool items of type timeline

PostThu Dec 24, 2020 7:23 am

(Beta 6, Build 18, MacOS 10.15.7)

In the LUA API, calling SetClipProperty on MediaPoolItems of type 'Timeline' (as opposed to 'Video & Audio') fails silently (returns true, but doesn't affect the timeline).

Context: I'm trying to create a timeline from a source video, then set the starting timecode of that timeline to match the starting timecode of the original video. I can call GetClipProperty("Start TC") on the MediaPoolItem which is the timeline and get its current value, but calling SetClipProperty("Start TC", <whatever>) has no effect (calling SetClipProperty on the original video MediaPoolItem does correctly change its value).

The Timeline object which is the timeline does not show any key for starting timecode value available in the list from GetSetting(), so I would assume that should be set by calling SetClipProperty on the MediaPoolItem. If that's correct, it would also be useful to be able to directly determine the corresponding MediaPoolItem object from a Timeline object.
Offline
User avatar

metkat

  • Posts: 15
  • Joined: Sat Jun 01, 2019 2:35 am
  • Location: Seattle, Washington
  • Real Name: Russell Harmon

Re: Lua API: SetClipProperty on MediaPool items of type time

PostThu Jan 21, 2021 10:44 pm

Confirmed still the case in Beta 7; no way to programmatically set the starting timecode for a timeline.
Offline

cyklotykblackmagic

  • Posts: 5
  • Joined: Mon May 10, 2021 7:07 pm
  • Real Name: Łukasz Marks

Re: Lua API: SetClipProperty on MediaPool items of type time

PostTue May 18, 2021 6:45 am

metkat wrote:Confirmed still the case in Beta 7; no way to programmatically set the starting timecode for a timeline.


Had the same problem.
Maybe my solution will help .

I use timecodes in names of timelines. And then i can use them.

Something like
20210425_13034502_CamKie_$GH010087.TL1

where 13034502 is the timecode.
DR API is like a minefield—it can throw challenges your way, but once you've navigated through them, the satisfaction is unmatched! Keep pushing forward, and the victories will be worth it.
Offline

Artur Piel

  • Posts: 11
  • Joined: Wed Jun 28, 2017 2:25 pm

Re: Lua API: SetClipProperty on MediaPool items of type time

PostFri Jun 18, 2021 4:16 pm

hey cyklotykblackmagic,

could you elaborate please, how would you use the timecode after placing it in the name?

Return to DaVinci Resolve

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Luke Holzmann and 302 guests