You simply can not do that with Blender’s current architecture.
Why do you want to render in a frame_change? Isn’t that essentially the same as clicking the Animation button that we already have?
You can make changes to the scene in the frame_change_pre handler. You can also set a flag in the render_pre handler to indicate that rendering is starting, then change it back in the render_post to indicate that rendering has stopped.
Something I wanted to test. Rendering composition to file and reloading the result in texture. It should happen on frame_change_pre and scene_update_post().
Couldn’t you just do a texture reload in the render_post handler? If it were an animated image it would always be one frame off, however.
scene_update is not reliable when rendering a frame range. You would only get one update when the frame range completes. Blender suspends scene update until the entire frame range is rendered then issues a scene update when it returns to the original frame it was on before the render process started. At least in my experience.
But I need to render it first from the compositing output. Too bad compositing is tied to scene render currently. I tried with global variables blocking render start if flagged as ongoing. No luck yet, probably my weak understanding of python, I really need to seat down and spend some time to read a primer.
I have fetched the output from different scenes, even Blender Internal in one scene and Cycles in another and then in a third scene composited them together.
If you could just make a full copy of the scene into another scene, then shift all of those keyframes back in time by one. Would something like that work?