I want to know how I can access the animation runtime fps from python to display it in the console.
1 Answer
$\begingroup$
$\endgroup$
The last time I looked at this there was no way to directly get the value directly from a property of the API.
You can emulate it with a frame change handler, here is some test code that prints the approx fps to console.
import bpy
import time
t0 = -1
def timer(scene):
global t0
t1 = time.clock()
fps = scene.render.fps / scene.render.fps_base
ms = 1000 * (t1 - t0)
fps = min(fps, (1000 / ms))
print("FPS:", fps)
t0 = t1
bpy.app.handlers.frame_change_post.append(timer)