FR (API): GetCurrentTimecode() Timecode Format Parameter

  • Author
  • Message
Offline
User avatar

X-Raym

  • Posts: 139
  • Joined: Thu Apr 18, 2013 4:05 pm
  • Location: France
  • Real Name: Raymond Radet

FR (API): GetCurrentTimecode() Timecode Format Parameter

PostSun Jan 23, 2022 1:27 pm

Hi,

To get playhead position, we currently have to use timeline:GetCurrentTimecode(). This returns a string of the playhead position in timecode format hh:mm:ss:ff.

This isn't very handy for calculation, and it doesn't match the other get time functions, like timeline_item:GetStart() which returns an integer as "frame from the start", which IMHO way more flexible.

Could we have a parameter to GetCurrentTimecode so we can choose between different format like frames and position in seconds ?

In REAPER, all API functions which returns time is done in seconds (with milliseconds of course), and there is just a format_pos function to handle the conversion to different string format. This is way more flexible, doesn't need to take care about timeline FPS, timeline start position etc contrary to Resolve.

THX!
My DaVinci Resolve Scripts: https://github.com/X-Raym/DaVinci-Resolve-Scripts
Donation: https://paypal.me/extremraym
Offline
User avatar

X-Raym

  • Posts: 139
  • Joined: Thu Apr 18, 2013 4:05 pm
  • Location: France
  • Real Name: Raymond Radet

Re: FR (API): GetCurrentTimecode() Timecode Format Parameter

PostSun Jan 23, 2022 5:35 pm

This should also be reported to the SetCurrentTimecode function.
My DaVinci Resolve Scripts: https://github.com/X-Raym/DaVinci-Resolve-Scripts
Donation: https://paypal.me/extremraym
Offline

张来吃_Lc

  • Posts: 10
  • Joined: Tue Nov 16, 2021 3:13 pm
  • Real Name: Zhang Qiushuang

Re: FR (API): GetCurrentTimecode() Timecode Format Parameter

PostMon Jan 24, 2022 3:47 am

+1+1+1

Return to DaVinci Resolve Feature Requests

Who is online

Users browsing this forum: JurgisZi and 29 guests