[Bf-extensions-cvs] [52adb675] master: Fix T102583: Node Wrangler: Fails to set viewer when nodegroup node in tree is missing datablock
Simon Thommes
noreply at git.blender.org
Thu Nov 17 14:20:17 CET 2022
Commit: 52adb675171b2ddf1a4a0a957d2d8ee818f6151e
Author: Simon Thommes
Date: Thu Nov 17 13:58:55 2022 +0100
Branches: master
https://developer.blender.org/rBA52adb675171b2ddf1a4a0a957d2d8ee818f6151e
Fix T102583: Node Wrangler: Fails to set viewer when nodegroup node in tree is missing datablock
Added nullcheck to make sure execution is possible.
Differential Revision: https://developer.blender.org/D16534
===================================================================
M node_wrangler.py
===================================================================
diff --git a/node_wrangler.py b/node_wrangler.py
index 5932388f..3b9378ee 100644
--- a/node_wrangler.py
+++ b/node_wrangler.py
@@ -1397,6 +1397,8 @@ class NWPreviewNode(Operator, NWBase):
# get all viewer sockets in a material tree
for node in tree.nodes:
if hasattr(node, "node_tree"):
+ if node.node_tree is None:
+ continue
for socket in node.node_tree.outputs:
if is_viewer_socket(socket) and (socket not in sockets):
sockets.append(socket)
More information about the Bf-extensions-cvs
mailing list