From 8a1b4c4321b0770bf7fbddbd0f37574dc4167a1e Mon Sep 17 00:00:00 2001 From: Carson Katri Date: Wed, 15 Nov 2023 20:43:29 -0500 Subject: [PATCH] Add check for nested trees --- api/tree.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/tree.py b/api/tree.py index ad12e10..d34dc81 100644 --- a/api/tree.py +++ b/api/tree.py @@ -162,7 +162,10 @@ def validate_param(param): # Return a function that creates a NodeGroup node in the tree. # This lets @trees be used in other @trees via simple function calls. def group_reference(*args, **kwargs): - result = geometrynodegroup(node_tree=node_group, *args, **kwargs) + if IS_BLENDER_4: + result = geometrynodegroup(node_tree=node_group, *args, **kwargs) + else: + result = group(node_tree=node_group, *args, **kwargs) group_outputs = [] for group_output in result._socket.node.outputs: group_outputs.append(Type(group_output))