I have a setup with animation nodes. I think I misused it a little bit, since I am not using it for a continuous animation, but rather to generate a different random frame every frame. However, it is completely deterministic, since every random aspect is seeded by the current frame.
Now my problem is: In the end, I want to move around a few objects with a matrix or a transform (don't care which). It works fine in the viewport, but when rendering everything works except moving the objects (I'm also instancing some objects, assigning a material, calling scripts etc., which all seems to work).
Now I read this question, but that does not seem to be my issue since no information is preserved across frames and everything is deterministic via the seed. I found a little workaround to make it work, but it seems more like a hack: If I render my animation with the following script, it works:
def fake_render(): scene = bpy.data.scenes["Scene"] for i in range(scene.frame_start, scene.frame_end + 1): scene.frame_current = i bpy.ops.render.render()
It also works if I change the frame, then turn off automatic execution of the node tree and then render the frame like normally. However, I now can't render it as an animation. Any idea what could cause this behavior? How can I make it render as animation?
Edit: Some additional information: It seems to render before everything is executed. During rendering, in the viewport I can see that all the objects get instantiated at (0,0,0) as I want them to. Then, it renders, and then the objects move towards to where I want them to be.