Output nodes have a is_active_output property, but it doesn't seem possible to set this consistently.

I believe there's a bug where doing node.is_active_output = True does nothing unless you first click in the UI on one of the output nodes to change which one is active, then after that node.is_active_output = True will work.

However I need to stick to the current latest Blender version and cannot wait for this to be patched. Is there some other way to consistently set what the active material output node is? Preferably without deleting any nodes.


1 Answer 1


As of this patch the bug is solved. You'll either have to download the latest 3.2 alpha build or wait for the official release which will be in 3 or 4 months from now if I'm not mistaken.

Here's a snippet to toggle between 2 outputs in the world shader (inspired by developer Jacques Lucke in the bug report):

import bpy

n1 = bpy.context.scene.world.node_tree.nodes['World Output']
n2 = bpy.context.scene.world.node_tree.nodes['World Output.001']

if not n1.is_active_output:
    n1.is_active_output = True
    n2.is_active_output = True


  • $\begingroup$ Yeah as I understand it, now (as before) just setting is_active_output = True on any node will automatically set other output nodes to False and it should work. $\endgroup$
    – Greg Zaal
    Mar 23, 2022 at 21:32
  • $\begingroup$ Thanks for this, it also works for material outputs, but somehow nobody talks about that... $\endgroup$ Oct 25, 2022 at 20:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .