**System Information**
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 497.29
**Blender Version**
Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: `rBc77597cd0e15`
Worked: 3.0
**Short description of error**
It seems to be (inconsistently) no longer possible to set the world/shader node tree's active output using python.
Running `node.is_active_output = True` in a fresh scene does anything. But if you (in the UI) click on one of the output nodes, setting it as the active output, then from that point onwards doing `node.is_active_output = True` will indeed work.
**Exact steps for others to reproduce the error**
1. Starting from factory defaults
2. In a python console editor, run: `node = C.scene.world.node_tree.nodes.new('ShaderNodeOutputWorld')` to create a new world output node. This node is named `World Output.001`. The original output node is named `World Output`.
3. Check the current state of the active output node:
4. `C.scene.world.node_tree.nodes['World Output'].is_active_output` - the result is `True` as this is the original node.
5. `C.scene.world.node_tree.nodes['World Output.001'].is_active_output` - the result is `False` as this is the new node.
6. Try set the new node as active output using `C.scene.world.node_tree.nodes['World Output.001'].is_active_output = True`. Nothing happens, the value remains `False` even after we set it.
7. In the UI, click on the newly created node, setting it as the active output (verify this with the code above if needed, `is_active_output` is now `True` for the new node)
8. Click on the original node to set that as the active output.
8. Run `C.scene.world.node_tree.nodes['World Output.001'].is_active_output = True` again, this time it successfully changes the tree's active output to that node.
As a side note, is there some other workaround way I can consistently set the node tree's active output? I need to fix an add-on and can't wait for this to be patched.