Render Layers in the node editor.

If I wasn’t bald I’d be pulling my hair out.

I’m working on a script that will, as part of it’s duties, set up a compositing node tree. This will involve compositing 4 layers from 2 rendered scenes, and so after creation I need to set the scene and layer on each render layer node, but I’ve experimented with whatever I could find on the API notes, and done googling, and I’m getting nowhere.

So time to ask, how do I set the scene and layer for a render layer node from python?

OK, I found how to set the render layer, but I still can’t set the scene. Help!!! lol

For info, this is what I want to achieve through python

Attachments


If IRC #blenderpython member LucaRood frequents here, I just want to say thank you. Your solution works. After more than a week of trying, I can move on with this project.