How to render some of view layers only (instead of single or all of them) I have LOTS of View Layers (generated in Python), and I only want to render and composite several of them at once.

When I checked "Render Single Layer" in View Layer options, only the active one in the UI would be rendered.

When I unchecked "Render Single Layer", all of them are rendered, including those I'm not using in compositor. Even I have only one Render Layers node and one Composite node in the compositor, when I press F12 Blender still renders every single view layer.

Is it possible to only render the layers I'm using in the compositor? Or it can only be achieved by more scripting?
If you have several layers, every layer has an "Use for Rendering" option. Tick this on all the layers you want and untick all you do not need. That's it.



The python property is ViewLayer.use, which you can access for each layer per data-block: bpy.data.scenes["Scene"].view_layers["LayerName"].use or per scene in context: bpy.context.scene.view_layers["LayerName"].use.