FPS python values do not match GUI drop down text?

Hi All,

I just noticed this on Blender 2.63 r50324.
Under the Render Context if I set my frame rate to 23.98 then fetch that value from python the python value is always an integer.

Can anyone else verify this?

Just set your FPS to 23.98 in a new file.
Then type this code in to python console.


I get the value of 24 returned, not 23.98.
The same deal on 29.97. I get a 30.

import bpy
rnd = bpy.data.scenes[0].render
print(rnd.fps / rnd.fps_base)


and for the benefit of those who don’t know how to round

import bpy
rnd = bpy.data.scenes[0].render
fps_float = rnd.fps / rnd.fps_base

print(round(fps_float, 2))


So where did fps_base come from? I don’t see it in the interface.

Atom, If you choose Custom as the frame rate you’ll see it in the UI.

Thanks, now I can better set my fps. I had never used custom.