Are there any callbacks to be called on Render BETWEEN RenderLayers?

Hello!
I know there is callback on begin and on the end of rendering in whole. But do someone know any way to call python code when finishing RenderLayer render or starting RenderLayer render inside scene render? By hack, patch or any other possible mean.
Any help welcome or a hint how it can be done

I doubt that a lot. Even in between frames some things cannot be changed. I believe you could write a render operator that would render Render Layers separately and do what you need in between. What are you trying to do?

Wow, thanks, i didn`t thought of that. Will try! The only question will compositing see all renders from such subsequent calls to isolated renders…

I need to update some material parameters based on RenderLayer currently rendered. So i can do compositing in one go without manual “render scene->change this and that in exact material nodes->re-render all->mix results in external soft” cycle. Because it is highly error-prone and wait for another rerender just to note that you forget to change parameter in one material… is a pain.

Since bpy is able to recompile OSL scripts - i planning to make dedicated osl script which will be python-updated (before renderlayer rendering) and change output socket with active RL-number. So materials will apply changes automatically, via usual nodes math/checks