How to set scene in render layers using Python?

Hi,
I didn’t found how to set the scene in render layers using Python. Could you help me please ?

image

rl_node = bpy.context.scene.node_tree.nodes['Render Layers']
rl_node.scene = bpy.data.scenes[0] # or whatever scene you want

This assumes your node is named ‘Render Layers’ of course, a smarter way to do it would be to loop through the node_tree.nodes collection and find the node you’re looking for by type, but that’s beyond the scope of your question.

Perfect ! Thanks !