Page 1 of 1

get framerate/FPS value via lua

PostPosted: Tue Sep 06, 2016 9:38 am
by PolderAnimation
I searched the api-browser and the forum but could not find an answer, so hopefully anyone here knows.

For a custom script I need to set the time value of the sceneGraph via updateTime(). But this needs a time value and we work with frameNumbers. So i need to devide my framenumber bij the framerate.
The Gui shows me the framerate/FPS slider, but how do i query this framerate value in lua?

Thanks in advance!

Jean-Paul

Re: get framerate/FPS value via lua

PostPosted: Tue Sep 06, 2016 9:55 am
by bepeg4d
Hi Jean-Paul,
here is the code:
local fps = octane.project.getProjectSettings():getAttribute(octane.A_FRAMES_PER_SECOND)
print(fps)

ciao beppe

Re: get framerate/FPS value via lua

PostPosted: Tue Sep 06, 2016 2:49 pm
by PolderAnimation
Thanks,

you're a life saver ;)