Fix #146551: Node wrangler treats warning nodes as unused nodes

Node wrangler has a "delete unused nodes" operator that will delete
nodes that do not contribute to the output of the node network.

Warning nodes, don't contribute to the output of the geometry nodes,
but it does output information to the Geometry nodes UI. So  warning
nodes should still be considered nodes that contribute to the output.

This commit adds warning nodes to the list of nodes that contribute
to the output to avoid them being deleted by the "delete unused nodes"
operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/146558
This commit is contained in:
Alaska
2025-09-30 11:34:50 +02:00
committed by Jacques Lucke
parent 193e5935d0
commit 05840611d7

View File

@@ -241,7 +241,8 @@ class NWDeleteUnused(Operator, NWBase):
def is_unused_node(self, node):
end_types = ['OUTPUT_MATERIAL', 'OUTPUT', 'VIEWER', 'COMPOSITE',
'SPLITVIEWER', 'OUTPUT_FILE', 'LEVELS', 'OUTPUT_LIGHT',
'OUTPUT_WORLD', 'GROUP_INPUT', 'GROUP_OUTPUT', 'FRAME']
'OUTPUT_WORLD', 'GROUP_INPUT', 'GROUP_OUTPUT', 'FRAME',
'WARNING']
if node.type in end_types:
return False