|
@@ -256,7 +256,8 @@ def get_schema_length_dependencies(node, all_nodes={}):
|
|
|
for l in inp.links:
|
|
for l in inp.links:
|
|
|
if "MANTIS_AUTOGENERATED" in l.from_node.signature:
|
|
if "MANTIS_AUTOGENERATED" in l.from_node.signature:
|
|
|
deps.extend([l.from_node]) # why we need this lol
|
|
deps.extend([l.from_node]) # why we need this lol
|
|
|
- if inp in prepare_links_to:
|
|
|
|
|
|
|
+ if inp.name in prepare_links_to:
|
|
|
|
|
+ deps.append(l.from_node)
|
|
|
deps.extend(get_all_dependencies(l.from_node))
|
|
deps.extend(get_all_dependencies(l.from_node))
|
|
|
def deps_filter(dep): # remove any nodes inside the schema
|
|
def deps_filter(dep): # remove any nodes inside the schema
|
|
|
if len(dep.signature) > len(node.signature):
|
|
if len(dep.signature) > len(node.signature):
|
|
@@ -265,15 +266,13 @@ def get_schema_length_dependencies(node, all_nodes={}):
|
|
|
if dep_sig_elem != node_sig_elem: break # they don't match, it isn't an inner-node
|
|
if dep_sig_elem != node_sig_elem: break # they don't match, it isn't an inner-node
|
|
|
else: # remove this, it didn't break, meaning it shares signature with outer node
|
|
else: # remove this, it didn't break, meaning it shares signature with outer node
|
|
|
return False # this is an inner-node
|
|
return False # this is an inner-node
|
|
|
- return True
|
|
|
|
|
- pass
|
|
|
|
|
|
|
+ return True
|
|
|
# this way we can handle Schema and Array Get nodes with one function
|
|
# this way we can handle Schema and Array Get nodes with one function
|
|
|
extend_dependencies_from_inputs(node)
|
|
extend_dependencies_from_inputs(node)
|
|
|
if node.node_type == 'DUMMY_SCHEMA':
|
|
if node.node_type == 'DUMMY_SCHEMA':
|
|
|
trees = [(node.prototype.node_tree, node.signature)] # this is UI data
|
|
trees = [(node.prototype.node_tree, node.signature)] # this is UI data
|
|
|
while trees:
|
|
while trees:
|
|
|
tree, tree_signature = trees.pop()
|
|
tree, tree_signature = trees.pop()
|
|
|
- print(tree_signature)
|
|
|
|
|
for sub_ui_node in tree.nodes:
|
|
for sub_ui_node in tree.nodes:
|
|
|
if sub_ui_node.bl_idname in ['NodeReroute', 'NodeFrame']:
|
|
if sub_ui_node.bl_idname in ['NodeReroute', 'NodeFrame']:
|
|
|
continue
|
|
continue
|
|
@@ -284,11 +283,7 @@ def get_schema_length_dependencies(node, all_nodes={}):
|
|
|
if sub_node.node_type == 'DUMMY_SCHEMA':
|
|
if sub_node.node_type == 'DUMMY_SCHEMA':
|
|
|
extend_dependencies_from_inputs(sub_node)
|
|
extend_dependencies_from_inputs(sub_node)
|
|
|
trees.append((sub_node.prototype.node_tree, sub_node.signature))
|
|
trees.append((sub_node.prototype.node_tree, sub_node.signature))
|
|
|
-
|
|
|
|
|
- filtered_deps = filter(deps_filter, deps)
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- return list(filtered_deps)
|
|
|
|
|
|
|
+ return list(filter(deps_filter, deps))
|
|
|
|
|
|
|
|
|
|
|
|
|
def parse_tree(base_tree):
|
|
def parse_tree(base_tree):
|