Sun 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