Get Updated Object Info between frames in render

Hi guys. I’m trying to retrieve information of objects during render (on frame change) using handlers. It works in viewport but not in render. During the render it keeps getting the info from the viewport not the updated position in render. Any tips about it?
Here’s a sample of the problem. See that during render it yet returns the position of the object in viewport.

import bpy
from bpy.app.handlers import persistent

def handler(scene):
    print(bpy.data.objects["Cube"].location)

bpy.app.handlers.frame_change_pre.append(handler)

https://developer.blender.org/T75364
https://developer.blender.org/T71234

1 Like

Great! It works. Thanks!