FR (API): Get timeline framerate in Fusion

  • 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): Get timeline framerate in Fusion

PostSun Jan 23, 2022 1:42 pm

Hi,

Currently we have
Code: Select all
proj:GetSetting('timelineFrameRate')


But this doesn't work at timeline level.

Can we have a function to get timeline framerate ?

Not having this makes a lot of things difficult as lots of function turns frame ID, or formated timecode, but making comparison between the two is basically impossible procedurally without a way to get FPS.

THX
Last edited by X-Raym on Sun Jan 23, 2022 2:02 pm, edited 1 time in total.
My DaVinci Resolve Scripts: https://github.com/X-Raym/DaVinci-Resolve-Scripts
Donation: https://paypal.me/extremraym
Offline

qhnu-bd

  • Posts: 12
  • Joined: Mon Jan 10, 2022 9:58 am
  • Location: Japan
  • Real Name: Masashi Sato

Re: FR (API): Get timeline framerate

PostSun Jan 23, 2022 2:01 pm

It can be obtained at

Code: Select all
local projectManager = resolve:GetProjectManager()
local project = projectManager:GetCurrentProject()
local timeline = project:GetCurrentTimeline()
dump("frameRate=" .. timeline:GetSetting("timelineFrameRate"))


However, the problem is that you cannot get it within Fusion(Render Script).
This is because the global variable "resolve" is not accessible.

Therefore, a more accurate description of this FR might be "Get TimelineFrameRate in Fusion(Render Script)".
Last edited by qhnu-bd on Tue Jan 25, 2022 5:37 am, edited 1 time in total.
Offline
User avatar

X-Raym

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

Re: FR (API): Get timeline framerate in Fusion

PostSun Jan 23, 2022 2:03 pm

@qhnu-bd
Thx for the code snippet this will help a lot!

I edit the thread title to reflect your FR.

Cheers!
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): Get timeline framerate in Fusion

PostSun Jan 23, 2022 2:39 pm

@qhnu-bd
Here was I was able to do thanks to your code snippet :)

Image
My DaVinci Resolve Scripts: https://github.com/X-Raym/DaVinci-Resolve-Scripts
Donation: https://paypal.me/extremraym

Return to DaVinci Resolve Feature Requests

Who is online

Users browsing this forum: No registered users and 8 guests