Fix multiple returns from sub-tree

pull/10/head
Carson Katri 2022-11-19 08:44:40 -05:00
rodzic 7a52377ae9
commit 852823af30
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -40,7 +40,6 @@ def tree(name):
# Collect the inputs
inputs = {}
input_groups = {}
def validate_param(param):
if param.annotation == inspect.Parameter.empty:
raise Exception(f"Tree input '{param.name}' has no type specified. Please annotate with a valid node input type.")
@ -129,7 +128,11 @@ def tree(name):
# 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):
return group(node_tree=node_group, *args, **kwargs)
result = group(node_tree=node_group, *args, **kwargs)
group_outputs = []
for group_output in result._socket.node.outputs:
group_outputs.append(Type(group_output))
return tuple(group_outputs)
return group_reference
if isinstance(name, str):
return build_tree