Skip to content

Commit 852823a

Browse files
committed
Fix multiple returns from sub-tree
1 parent 7a52377 commit 852823a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

api/tree.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def build_tree(builder):
4040

4141
# Collect the inputs
4242
inputs = {}
43-
input_groups = {}
4443
def validate_param(param):
4544
if param.annotation == inspect.Parameter.empty:
4645
raise Exception(f"Tree input '{param.name}' has no type specified. Please annotate with a valid node input type.")
@@ -129,7 +128,11 @@ def validate_param(param):
129128
# Return a function that creates a NodeGroup node in the tree.
130129
# This lets @trees be used in other @trees via simple function calls.
131130
def group_reference(*args, **kwargs):
132-
return group(node_tree=node_group, *args, **kwargs)
131+
result = group(node_tree=node_group, *args, **kwargs)
132+
group_outputs = []
133+
for group_output in result._socket.node.outputs:
134+
group_outputs.append(Type(group_output))
135+
return tuple(group_outputs)
133136
return group_reference
134137
if isinstance(name, str):
135138
return build_tree

0 commit comments

Comments
 (0)