Get/Set Frames per second in blender

Hey all,

Quick question that I’m surprisingly having a lot of trouble finding the answer to. I’ve written an exporter that exports the translation/rotation of each joint in an animated skeleton for each frame, but I can’t find where I can query what the current frame rate.

I have found the fps setting in the RenderSettings, but there are two problems
a) I don’t know how to get to that value through the python api?
b) It seems like thats just the fps for rendering, not for animation. I would’ve thought that there would be a way to set/get the animation fps in the time line somewhere, as there’s no reason for the render fps and animation fps to be dependent.

If anyone can answer a and/or b, I’d really appreciate it.


Just to be clearer:
My script will get the x rotation of a joint at a particular frame, n, by calling
curve.evaluate(n) (where curve is the euler x channel, for example). How can i find out how much time has passed between n and n+1?





b) not quite sure what you mean. You render animations and that is the framerate that it would render and play in the timeline.


Awesome. Thanks cmomoney, that’ll do the job. I took at look at fps_base and it’s value is 1.0, so at a guess that’s some sort of time scale value or something?

b) Maybe this isn’t the way blender works, but if you think about it, you could animate at any framerate you like, independent of what framerate the scene rendered at. The animators I work with always animate at 60 fps, but usually render sample clips at 30fps at the most. I was just wondering if blender had two independent fps controls like that, but it seems like they’re one and the same.

Thanks again.