|
@@ -3,10 +3,10 @@ from .utilities import (prRed, prGreen, prPurple, prWhite,
|
|
|
wrapRed, wrapGreen, wrapPurple, wrapWhite,
|
|
wrapRed, wrapGreen, wrapPurple, wrapWhite,
|
|
|
wrapOrange,)
|
|
wrapOrange,)
|
|
|
from .utilities import init_connections, init_dependencies
|
|
from .utilities import init_connections, init_dependencies
|
|
|
-from .base_definitions import SchemaUINode, GraphError, replace_types, custom_props_types
|
|
|
|
|
|
|
+from .base_definitions import SchemaUINode, custom_props_types, MantisNodeGroup
|
|
|
from .node_container_common import setup_custom_props_from_np
|
|
from .node_container_common import setup_custom_props_from_np
|
|
|
# a class that solves Schema nodes
|
|
# a class that solves Schema nodes
|
|
|
-
|
|
|
|
|
|
|
+from bpy.types import NodeGroupInput, NodeGroupOutput
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -33,7 +33,13 @@ class SchemaSolver:
|
|
|
self.held_links = []
|
|
self.held_links = []
|
|
|
self.tree_path_names = [*self.node.signature] # same tree as the schema node
|
|
self.tree_path_names = [*self.node.signature] # same tree as the schema node
|
|
|
self.autogen_path_names = ['SCHEMA_AUTOGENERATED', *self.node.signature[1:]]
|
|
self.autogen_path_names = ['SCHEMA_AUTOGENERATED', *self.node.signature[1:]]
|
|
|
- self.index_link = self.node.inputs['Schema Length'].links[0]
|
|
|
|
|
|
|
+ self.is_node_group = False
|
|
|
|
|
+ if self.node.prototype.bl_idname == "MantisNodeGroup":
|
|
|
|
|
+ self.is_node_group = True
|
|
|
|
|
+ if self.node.inputs['Schema Length'].links:
|
|
|
|
|
+ self.index_link = self.node.inputs['Schema Length'].links[0]
|
|
|
|
|
+ else:
|
|
|
|
|
+ self.index_link = None
|
|
|
self.solve_length = self.node.evaluate_input("Schema Length")
|
|
self.solve_length = self.node.evaluate_input("Schema Length")
|
|
|
# I'm making this a property of the solver because the solver's data is modified as it solves each iteration
|
|
# I'm making this a property of the solver because the solver's data is modified as it solves each iteration
|
|
|
self.index = 0
|
|
self.index = 0
|
|
@@ -47,28 +53,43 @@ class SchemaSolver:
|
|
|
inp.links.sort(key=lambda a : -a.multi_input_sort_id)
|
|
inp.links.sort(key=lambda a : -a.multi_input_sort_id)
|
|
|
|
|
|
|
|
for ui_node in self.tree.nodes:
|
|
for ui_node in self.tree.nodes:
|
|
|
|
|
+ # first we need to fill the parameters of the schema nodes.
|
|
|
|
|
+ # we use the bl_idname because all schema nodes should be single-instance
|
|
|
|
|
+ signature = (*self.tree_path_names, ui_node.bl_idname)
|
|
|
if isinstance(ui_node, SchemaUINode):
|
|
if isinstance(ui_node, SchemaUINode):
|
|
|
- # first we need to fill the parameters of the schema nodes.
|
|
|
|
|
- # we use the bl_idname because all schema nodes should be single-instance
|
|
|
|
|
- signature = (*self.tree_path_names, ui_node.bl_idname)
|
|
|
|
|
# We use the solver's signature here because it represents the "original" signature of the schema UI group node
|
|
# We use the solver's signature here because it represents the "original" signature of the schema UI group node
|
|
|
# since this schema solver may be in a nested schema, and its node's signature may have uuid/index attached.
|
|
# since this schema solver may be in a nested schema, and its node's signature may have uuid/index attached.
|
|
|
get_sig = (*self.signature, ui_node.bl_idname)
|
|
get_sig = (*self.signature, ui_node.bl_idname)
|
|
|
if not (mantis_node := self.all_nodes.get(get_sig)): raise RuntimeError(wrapRed(f"Not found: {get_sig}"))
|
|
if not (mantis_node := self.all_nodes.get(get_sig)): raise RuntimeError(wrapRed(f"Not found: {get_sig}"))
|
|
|
self.schema_nodes[signature] = mantis_node
|
|
self.schema_nodes[signature] = mantis_node
|
|
|
mantis_node.fill_parameters(ui_node)
|
|
mantis_node.fill_parameters(ui_node)
|
|
|
|
|
+ # HACK to make Group Nodes work
|
|
|
|
|
+ if ui_node.bl_idname == "NodeGroupInput":
|
|
|
|
|
+ from .schema_containers import SchemaConstInput
|
|
|
|
|
+ mantis_node = SchemaConstInput(signature=signature, base_tree=self.node.base_tree, parent_schema_node=self.node)
|
|
|
|
|
+ self.schema_nodes[signature] = mantis_node
|
|
|
|
|
+ mantis_node.fill_parameters(ui_node)
|
|
|
|
|
+ if ui_node.bl_idname == "NodeGroupOutput":
|
|
|
|
|
+ from .schema_containers import SchemaConstOutput
|
|
|
|
|
+ mantis_node = SchemaConstOutput(signature=signature, base_tree=self.node.base_tree, parent_schema_node=self.node)
|
|
|
|
|
+ self.schema_nodes[signature] = mantis_node
|
|
|
|
|
+ mantis_node.fill_parameters(ui_node)
|
|
|
|
|
|
|
|
def set_index_strings(self):
|
|
def set_index_strings(self):
|
|
|
self.index_str = lambda : '.'+str(self.uuid)+'.'+str(self.index).zfill(4)
|
|
self.index_str = lambda : '.'+str(self.uuid)+'.'+str(self.index).zfill(4)
|
|
|
self.prev_index_str = lambda : '.'+str(self.uuid)+'.'+str(self.index-1).zfill(4)
|
|
self.prev_index_str = lambda : '.'+str(self.uuid)+'.'+str(self.index-1).zfill(4)
|
|
|
|
|
+ if self.is_node_group:
|
|
|
|
|
+ self.index_str=lambda : ''
|
|
|
|
|
+ self.prev_index_str=lambda : ''
|
|
|
|
|
|
|
|
def init_schema_links(self,):
|
|
def init_schema_links(self,):
|
|
|
""" Sort and store the links to/from the Schema group node."""
|
|
""" Sort and store the links to/from the Schema group node."""
|
|
|
for item in self.tree.interface.items_tree:
|
|
for item in self.tree.interface.items_tree:
|
|
|
if item.item_type == 'PANEL': continue
|
|
if item.item_type == 'PANEL': continue
|
|
|
- if not item.parent:
|
|
|
|
|
- raise GraphError("ERROR: Schema tree has inputs that are not in categories. This is not supported")
|
|
|
|
|
- match item.parent.name:
|
|
|
|
|
|
|
+ parent_name='Constant'
|
|
|
|
|
+ if item.parent.name != '': # in an "prphan" item this is left blank , it is not None or an AttributeError.
|
|
|
|
|
+ parent_name = item.parent.name
|
|
|
|
|
+ match parent_name:
|
|
|
case 'Connection':
|
|
case 'Connection':
|
|
|
if item.in_out == 'INPUT':
|
|
if item.in_out == 'INPUT':
|
|
|
if incoming_links := self.node.inputs[item.identifier].links:
|
|
if incoming_links := self.node.inputs[item.identifier].links:
|
|
@@ -108,23 +129,38 @@ class SchemaSolver:
|
|
|
|
|
|
|
|
def gen_solve_iteration_mantis_nodes(self, frame_mantis_nodes, unprepared):
|
|
def gen_solve_iteration_mantis_nodes(self, frame_mantis_nodes, unprepared):
|
|
|
for prototype_ui_node in self.tree.nodes:
|
|
for prototype_ui_node in self.tree.nodes:
|
|
|
|
|
+ mantis_node_name = prototype_ui_node.name
|
|
|
|
|
+ index_str = self.index_str()
|
|
|
if isinstance(prototype_ui_node, SchemaUINode):
|
|
if isinstance(prototype_ui_node, SchemaUINode):
|
|
|
continue # IGNORE the schema interface nodes, we already made them in __init__()
|
|
continue # IGNORE the schema interface nodes, we already made them in __init__()
|
|
|
# they are reused for each iteration.
|
|
# they are reused for each iteration.
|
|
|
elif prototype_ui_node.bl_idname in ['NodeFrame', 'NodeReroute']:
|
|
elif prototype_ui_node.bl_idname in ['NodeFrame', 'NodeReroute']:
|
|
|
continue # IGNORE stuff that is purely UI - frames, reroutes.
|
|
continue # IGNORE stuff that is purely UI - frames, reroutes.
|
|
|
- signature = (*self.autogen_path_names, prototype_ui_node.name+self.index_str())
|
|
|
|
|
- prototype_mantis_node = self.all_nodes[(*self.signature, prototype_ui_node.name)]
|
|
|
|
|
|
|
+ elif prototype_ui_node.bl_idname in ['NodeGroupInput', 'NodeGroupOutput']:
|
|
|
|
|
+ continue # we converted these to Schema Nodes because they represent a Group input.
|
|
|
|
|
+ signature = (*self.autogen_path_names, mantis_node_name+index_str)
|
|
|
|
|
+ prototype_mantis_node = self.all_nodes[(*self.signature, mantis_node_name)]
|
|
|
# the prototype_mantis_node was generated inside the schema when we parsed the tree.
|
|
# the prototype_mantis_node was generated inside the schema when we parsed the tree.
|
|
|
# it is the prototype of the mantis node which we make for this iteration
|
|
# it is the prototype of the mantis node which we make for this iteration
|
|
|
# for Schema sub-nodes ... they need a prototype to init.
|
|
# for Schema sub-nodes ... they need a prototype to init.
|
|
|
if prototype_mantis_node.node_type in ['DUMMY', 'DUMMY_SCHEMA']:
|
|
if prototype_mantis_node.node_type in ['DUMMY', 'DUMMY_SCHEMA']:
|
|
|
- from .utilities import get_node_prototype
|
|
|
|
|
- ui_node = get_node_prototype(prototype_mantis_node.signature, prototype_mantis_node.base_tree)
|
|
|
|
|
- if prototype_mantis_node.node_type == 'DUMMY_SCHEMA':
|
|
|
|
|
|
|
+ # We stored the prototype ui_node when creating the Mantis node.
|
|
|
|
|
+ ui_node = prototype_mantis_node.prototype
|
|
|
|
|
+ # if prototype_mantis_node is a group or schema: TODO changes are needed elsewhere to make this easier to read. LEGIBILITY
|
|
|
|
|
+ if ui_node.bl_idname in ["MantisNodeGroup", "SchemaGroup"]:
|
|
|
mantis_node = prototype_mantis_node.__class__(
|
|
mantis_node = prototype_mantis_node.__class__(
|
|
|
signature, prototype_mantis_node.base_tree, prototype=ui_node,
|
|
signature, prototype_mantis_node.base_tree, prototype=ui_node,
|
|
|
natural_signature = (*self.node.signature, ui_node.name) )
|
|
natural_signature = (*self.node.signature, ui_node.name) )
|
|
|
|
|
+ # now let's copy the links from the prototype node
|
|
|
|
|
+ if ui_node.bl_idname in ["MantisNodeGroup"]:
|
|
|
|
|
+ mantis_node.prepared = False
|
|
|
|
|
+ mantis_node.node_type = 'DUMMY_SCHEMA' # we promote it to a schema for now
|
|
|
|
|
+ mantis_node.inputs.init_sockets(['Schema Length']) # add a Schema Length socket
|
|
|
|
|
+ mantis_node.parameters['Schema Length'] = 1 # set the length to 1 since it is a single group instance
|
|
|
|
|
+ # we'll make the autogenerated nodes for constant inputs. It doesn't matter that there is technically
|
|
|
|
|
+ # a prototype available for each one -- these are cheap and I want this to be easy.
|
|
|
|
|
+ from .readtree import make_connections_to_ng_dummy
|
|
|
|
|
+ make_connections_to_ng_dummy(self.node.base_tree, self.autogen_path_names, frame_mantis_nodes, self.all_nodes, mantis_node)
|
|
|
else:
|
|
else:
|
|
|
mantis_node = prototype_mantis_node.__class__(signature, prototype_mantis_node.base_tree, prototype=ui_node)
|
|
mantis_node = prototype_mantis_node.__class__(signature, prototype_mantis_node.base_tree, prototype=ui_node)
|
|
|
else:
|
|
else:
|
|
@@ -145,13 +181,22 @@ class SchemaSolver:
|
|
|
from .utilities import gen_nc_input_for_data
|
|
from .utilities import gen_nc_input_for_data
|
|
|
nc_cls = gen_nc_input_for_data(ui_link.from_socket)
|
|
nc_cls = gen_nc_input_for_data(ui_link.from_socket)
|
|
|
if (nc_cls): #HACK
|
|
if (nc_cls): #HACK
|
|
|
- sig = ("MANTIS_AUTOGENERATED", *self.tree_path_names[1:-1], self.index_str(), ui_link.from_socket.name, ui_link.from_socket.identifier)
|
|
|
|
|
- nc_from = nc_cls(sig, self.node.base_tree)
|
|
|
|
|
|
|
+ unique_name = "".join([
|
|
|
|
|
+ ui_link.to_socket.node.name+self.index_str(),
|
|
|
|
|
+ ui_link.from_socket.name,
|
|
|
|
|
+ ui_link.from_socket.identifier,
|
|
|
|
|
+ "==>",
|
|
|
|
|
+ ui_link.to_socket.name,
|
|
|
|
|
+ ui_link.to_socket.identifier,
|
|
|
|
|
+ ])
|
|
|
|
|
+ sig = ("MANTIS_AUTOGENERATED", *self.tree_path_names[1:-1], unique_name)
|
|
|
|
|
+ nc_from = frame_mantis_nodes.get(sig)
|
|
|
|
|
+ if not nc_from:
|
|
|
|
|
+ nc_from = nc_cls(sig, self.node.base_tree)
|
|
|
# ugly! maybe even a HACK!
|
|
# ugly! maybe even a HACK!
|
|
|
nc_from.inputs = {}
|
|
nc_from.inputs = {}
|
|
|
from .base_definitions import NodeSocket
|
|
from .base_definitions import NodeSocket
|
|
|
nc_from.outputs = {ui_link.from_socket.name:NodeSocket(name = ui_link.from_socket.name, node=nc_from)}
|
|
nc_from.outputs = {ui_link.from_socket.name:NodeSocket(name = ui_link.from_socket.name, node=nc_from)}
|
|
|
- from .node_container_common import get_socket_value
|
|
|
|
|
nc_from.parameters = {ui_link.from_socket.name:index}
|
|
nc_from.parameters = {ui_link.from_socket.name:index}
|
|
|
frame_mantis_nodes[sig]=nc_from
|
|
frame_mantis_nodes[sig]=nc_from
|
|
|
from_node = nc_from
|
|
from_node = nc_from
|
|
@@ -168,6 +213,9 @@ class SchemaSolver:
|
|
|
_from_name, to_name = get_link_in_out(ui_link)
|
|
_from_name, to_name = get_link_in_out(ui_link)
|
|
|
to_node = frame_mantis_nodes[(*self.autogen_path_names, to_name+self.index_str())]
|
|
to_node = frame_mantis_nodes[(*self.autogen_path_names, to_name+self.index_str())]
|
|
|
# this self.index_link is only used here?
|
|
# this self.index_link is only used here?
|
|
|
|
|
+ if self.index_link is None:
|
|
|
|
|
+ # this should be impossible because the Schema gets an auto-generated Int input.
|
|
|
|
|
+ raise NotImplementedError("This code should be unreachable. Please report this as a bug!")
|
|
|
if (self.index_link.from_node):
|
|
if (self.index_link.from_node):
|
|
|
connection = self.index_link.from_node.outputs[self.index_link.from_socket].connect(node=to_node, socket=ui_link.to_socket.name)
|
|
connection = self.index_link.from_node.outputs[self.index_link.from_socket].connect(node=to_node, socket=ui_link.to_socket.name)
|
|
|
# otherwise we can autogen an int input I guess...?
|
|
# otherwise we can autogen an int input I guess...?
|
|
@@ -235,6 +283,10 @@ class SchemaSolver:
|
|
|
from .utilities import get_link_in_out
|
|
from .utilities import get_link_in_out
|
|
|
to_node = self.schema_nodes[(*self.tree_path_names, to_ui_node.bl_idname)]
|
|
to_node = self.schema_nodes[(*self.tree_path_names, to_ui_node.bl_idname)]
|
|
|
expose_when = to_node.evaluate_input('Expose when N==')
|
|
expose_when = to_node.evaluate_input('Expose when N==')
|
|
|
|
|
+ # HACK here to force it to work with ordinary node groups, which don't seem to set this value correctly.
|
|
|
|
|
+ if to_ui_node.bl_idname == "NodeGroupOutput":
|
|
|
|
|
+ expose_when = index # just set it directly since it is getting set to None somewhere (I should find out where tho)
|
|
|
|
|
+ # end HACK
|
|
|
if index == expose_when:
|
|
if index == expose_when:
|
|
|
for outgoing in self.constant_out[ui_link.to_socket.name]:
|
|
for outgoing in self.constant_out[ui_link.to_socket.name]:
|
|
|
to_node = outgoing.to_node
|
|
to_node = outgoing.to_node
|
|
@@ -332,7 +384,8 @@ class SchemaSolver:
|
|
|
if sum([dep.prepared for dep in nc.hierarchy_dependencies]) == len(nc.hierarchy_dependencies):
|
|
if sum([dep.prepared for dep in nc.hierarchy_dependencies]) == len(nc.hierarchy_dependencies):
|
|
|
nc.bPrepare()
|
|
nc.bPrepare()
|
|
|
if nc.node_type == 'DUMMY_SCHEMA':
|
|
if nc.node_type == 'DUMMY_SCHEMA':
|
|
|
- self.solve_nested_schema(nc)
|
|
|
|
|
|
|
+ schema_solver = self.solve_nested_schema(nc)
|
|
|
|
|
+
|
|
|
else: # Keeping this for-loop as a fallback, it should never add dependencies though
|
|
else: # Keeping this for-loop as a fallback, it should never add dependencies though
|
|
|
for dep in nc.hierarchy_dependencies:
|
|
for dep in nc.hierarchy_dependencies:
|
|
|
if not dep.prepared and dep not in unprepared:
|
|
if not dep.prepared and dep not in unprepared:
|
|
@@ -401,6 +454,7 @@ class SchemaSolver:
|
|
|
awaiting_prep_stage = []
|
|
awaiting_prep_stage = []
|
|
|
for ui_link in ui_links:
|
|
for ui_link in ui_links:
|
|
|
to_ui_node = ui_link.to_socket.node; from_ui_node = ui_link.from_socket.node
|
|
to_ui_node = ui_link.to_socket.node; from_ui_node = ui_link.from_socket.node
|
|
|
|
|
+
|
|
|
if isinstance(from_ui_node, SchemaIndex):
|
|
if isinstance(from_ui_node, SchemaIndex):
|
|
|
if ui_link.from_socket.name == "Index":
|
|
if ui_link.from_socket.name == "Index":
|
|
|
self.handle_link_from_index_input(self.index, frame_mantis_nodes, ui_link)
|
|
self.handle_link_from_index_input(self.index, frame_mantis_nodes, ui_link)
|
|
@@ -411,7 +465,7 @@ class SchemaSolver:
|
|
|
if ui_link.from_socket.name in self.incoming_connections.keys():
|
|
if ui_link.from_socket.name in self.incoming_connections.keys():
|
|
|
self.handle_link_from_incoming_connection_input(frame_mantis_nodes, ui_link)
|
|
self.handle_link_from_incoming_connection_input(frame_mantis_nodes, ui_link)
|
|
|
continue
|
|
continue
|
|
|
- if isinstance(from_ui_node, SchemaConstInput):
|
|
|
|
|
|
|
+ if isinstance(from_ui_node, (SchemaConstInput, NodeGroupInput)):
|
|
|
if ui_link.from_socket.name in self.constant_in.keys():
|
|
if ui_link.from_socket.name in self.constant_in.keys():
|
|
|
self.handle_link_from_constant_input( frame_mantis_nodes, ui_link, to_ui_node)
|
|
self.handle_link_from_constant_input( frame_mantis_nodes, ui_link, to_ui_node)
|
|
|
continue
|
|
continue
|
|
@@ -426,12 +480,13 @@ class SchemaSolver:
|
|
|
self.held_links.append(ui_link)
|
|
self.held_links.append(ui_link)
|
|
|
continue
|
|
continue
|
|
|
# HOLD these links until prep is done a little later
|
|
# HOLD these links until prep is done a little later
|
|
|
- if isinstance(to_ui_node, SchemaConstOutput) or isinstance(to_ui_node, SchemaArrayOutput) or \
|
|
|
|
|
|
|
+ if isinstance(to_ui_node, (SchemaConstOutput, NodeGroupOutput)) or isinstance(to_ui_node, SchemaArrayOutput) or \
|
|
|
isinstance(from_ui_node, SchemaArrayInputGet):
|
|
isinstance(from_ui_node, SchemaArrayInputGet):
|
|
|
awaiting_prep_stage.append(ui_link)
|
|
awaiting_prep_stage.append(ui_link)
|
|
|
continue
|
|
continue
|
|
|
# for any of the special cases, we hit a 'continue' block. So this connection is not special, and is made here.
|
|
# for any of the special cases, we hit a 'continue' block. So this connection is not special, and is made here.
|
|
|
connection = link_node_containers(self.autogen_path_names, ui_link, frame_mantis_nodes, from_suffix=self.index_str(), to_suffix=self.index_str())
|
|
connection = link_node_containers(self.autogen_path_names, ui_link, frame_mantis_nodes, from_suffix=self.index_str(), to_suffix=self.index_str())
|
|
|
|
|
+
|
|
|
for k,v in frame_mantis_nodes.items():
|
|
for k,v in frame_mantis_nodes.items():
|
|
|
self.solved_nodes[k]=v
|
|
self.solved_nodes[k]=v
|
|
|
init_dependencies(v) # it is hard to overstate how important this single line of code is
|
|
init_dependencies(v) # it is hard to overstate how important this single line of code is
|
|
@@ -441,7 +496,7 @@ class SchemaSolver:
|
|
|
while(awaiting_prep_stage):
|
|
while(awaiting_prep_stage):
|
|
|
ui_link = awaiting_prep_stage.pop()
|
|
ui_link = awaiting_prep_stage.pop()
|
|
|
to_ui_node = ui_link.to_socket.node; from_ui_node = ui_link.from_socket.node
|
|
to_ui_node = ui_link.to_socket.node; from_ui_node = ui_link.from_socket.node
|
|
|
- if isinstance(to_ui_node, SchemaConstOutput):
|
|
|
|
|
|
|
+ if isinstance(to_ui_node, (SchemaConstOutput, NodeGroupOutput)):
|
|
|
self.handle_link_to_constant_output(frame_mantis_nodes, self.index, ui_link, to_ui_node)
|
|
self.handle_link_to_constant_output(frame_mantis_nodes, self.index, ui_link, to_ui_node)
|
|
|
if isinstance(to_ui_node, SchemaArrayOutput):
|
|
if isinstance(to_ui_node, SchemaArrayOutput):
|
|
|
self.handle_link_to_array_output(frame_mantis_nodes, self.index, ui_link, to_ui_node, from_ui_node)
|
|
self.handle_link_to_array_output(frame_mantis_nodes, self.index, ui_link, to_ui_node, from_ui_node)
|
|
@@ -454,17 +509,22 @@ class SchemaSolver:
|
|
|
""" Solves all schema node groups found in this Schema. This is a recursive function, which will
|
|
""" Solves all schema node groups found in this Schema. This is a recursive function, which will
|
|
|
solve all levels of nested schema - since this function is called by solver.solve().
|
|
solve all levels of nested schema - since this function is called by solver.solve().
|
|
|
"""
|
|
"""
|
|
|
|
|
+ solver=None
|
|
|
if schema_nc.prepared == False:
|
|
if schema_nc.prepared == False:
|
|
|
all_nodes = self.all_nodes.copy()
|
|
all_nodes = self.all_nodes.copy()
|
|
|
ui_node = schema_nc.prototype
|
|
ui_node = schema_nc.prototype
|
|
|
length = schema_nc.evaluate_input("Schema Length")
|
|
length = schema_nc.evaluate_input("Schema Length")
|
|
|
tree = ui_node.node_tree
|
|
tree = ui_node.node_tree
|
|
|
- prOrange(f"Expanding schema {tree.name} in node {schema_nc} with length {length}.")
|
|
|
|
|
|
|
+ if schema_nc.prototype.bl_idname == "MantisNodeGroup":
|
|
|
|
|
+ prOrange(f"Expanding Node Group {tree.name} in node {schema_nc}.")
|
|
|
|
|
+ else:
|
|
|
|
|
+ prOrange(f"Expanding schema {tree.name} in node {schema_nc} with length {length}.")
|
|
|
solver = SchemaSolver(schema_nc, all_nodes, ui_node, schema_nc.natural_signature)
|
|
solver = SchemaSolver(schema_nc, all_nodes, ui_node, schema_nc.natural_signature)
|
|
|
solved_nodes = solver.solve()
|
|
solved_nodes = solver.solve()
|
|
|
schema_nc.prepared = True
|
|
schema_nc.prepared = True
|
|
|
for k,v in solved_nodes.items():
|
|
for k,v in solved_nodes.items():
|
|
|
self.solved_nodes[k]=v
|
|
self.solved_nodes[k]=v
|
|
|
|
|
+ return solver
|
|
|
|
|
|
|
|
|
|
|
|
|
def finalize(self, frame_nc):
|
|
def finalize(self, frame_nc):
|