|  | @@ -146,6 +146,8 @@ class SchemaSolver:
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    def is_node_deeper_nested(self, queried_node, compare_node):
 | 
	
		
			
				|  |  | +        return len(compare_node.signature) < len(queried_node.signature)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      def gen_solve_iteration_mantis_nodes(self, frame_mantis_nodes, unprepared):
 | 
	
		
			
				|  |  |          for prototype_ui_node in self.tree.nodes:
 | 
	
	
		
			
				|  | @@ -259,14 +261,31 @@ class SchemaSolver:
 | 
	
		
			
				|  |  |      def handle_link_to_outgoing_connection_output(self, frame_mantis_nodes, ui_link,):
 | 
	
		
			
				|  |  |          mantis_incoming_node = self.schema_nodes[*self.tree_path_names,  'SchemaIncomingConnection']
 | 
	
		
			
				|  |  |          for mantis_link in mantis_incoming_node.outputs[ui_link.to_socket.name].links:
 | 
	
		
			
				|  |  | -            to_mantis_node, to_mantis_socket = mantis_link.to_node, mantis_link.to_socket
 | 
	
		
			
				|  |  | +            to_mantis_node, to_socket_name = mantis_link.to_node, mantis_link.to_socket
 | 
	
		
			
				|  |  |              from_name = get_link_in_out(ui_link)[0]
 | 
	
		
			
				|  |  |              from_mantis_node = self.solved_nodes[ (*self.autogen_path_names, from_name+self.prev_index_str()) ]
 | 
	
		
			
				|  |  | -            to_mantis_node = frame_mantis_nodes[ (*self.autogen_path_names, to_mantis_node.signature[-1]+self.index_str()) ]
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            to_mantis_node_signature = ( *self.autogen_path_names,
 | 
	
		
			
				|  |  | +                            to_mantis_node.signature[-1] + self.index_str() )
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            # we need to detect if the next node is in a group.
 | 
	
		
			
				|  |  | +            # REMEMBER: at this point, nested groups haven't been solved yet.
 | 
	
		
			
				|  |  | +            if to_mantis_node_signature not in frame_mantis_nodes.keys() and \
 | 
	
		
			
				|  |  | +                    self.is_node_deeper_nested(to_mantis_node, from_mantis_node):
 | 
	
		
			
				|  |  | +                to_mantis_node = frame_mantis_nodes[ (
 | 
	
		
			
				|  |  | +                    *self.autogen_path_names, # the SCHEMA_AUTOGENERATED string
 | 
	
		
			
				|  |  | +                    to_mantis_node.signature[-2]+ self.index_str() ) ]
 | 
	
		
			
				|  |  | +                # this connection was forbidden before, right? so this should be a safe assumption.
 | 
	
		
			
				|  |  | +                assert to_mantis_node.node_type == 'DUMMY_SCHEMA', "I expected this to be a group/schema"
 | 
	
		
			
				|  |  | +                # we need to get the identifier of the named socket now.
 | 
	
		
			
				|  |  | +                to_socket_name = to_mantis_node.prototype.inputs[to_socket_name].identifier
 | 
	
		
			
				|  |  | +            else:
 | 
	
		
			
				|  |  | +                to_mantis_node = frame_mantis_nodes[ to_mantis_node_signature ] # add the index string
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              from_socket_name = ui_link.from_socket.name
 | 
	
		
			
				|  |  |              if from_mantis_node.node_type in ['DUMMY_SCHEMA']:
 | 
	
		
			
				|  |  |                  from_socket_name = ui_link.from_socket.identifier
 | 
	
		
			
				|  |  | -            connection = from_mantis_node.outputs[from_socket_name].connect(node=to_mantis_node, socket=to_mantis_socket)
 | 
	
		
			
				|  |  | +            connection = from_mantis_node.outputs[from_socket_name].connect(node=to_mantis_node, socket=to_socket_name)
 | 
	
		
			
				|  |  |              # We want to delete the links from the tree into the schema node.
 | 
	
		
			
				|  |  |              # TODO: this is not robust enough and I do not feel sure this is doing the right thing.
 | 
	
		
			
				|  |  |              if existing_link := self.incoming_connections[ui_link.to_socket.name]:
 | 
	
	
		
			
				|  | @@ -607,15 +626,8 @@ class SchemaSolver:
 | 
	
		
			
				|  |  |              # HOLD these links to the next iteration:
 | 
	
		
			
				|  |  |              if isinstance(to_ui_node, SchemaOutgoingConnection):
 | 
	
		
			
				|  |  |                  if isinstance(from_ui_node, (MantisNodeGroup, SchemaGroup)):
 | 
	
		
			
				|  |  | -                    e = NotImplementedError(
 | 
	
		
			
				|  |  | -                        "You have connected a Node Group or Schema directly into an Outgoing Connection node"
 | 
	
		
			
				|  |  | -                        " inside another Schema. This is not currently supported. Try using a Constant Output" \
 | 
	
		
			
				|  |  | -                        f" instead. Affected node: {from_ui_node.name}"
 | 
	
		
			
				|  |  | -                        )
 | 
	
		
			
				|  |  | -                    e = execution_error_cleanup(self.node, e, show_error=self.error_popups)
 | 
	
		
			
				|  |  | -                    raise e # always raise this error because it is not implemented.
 | 
	
		
			
				|  |  |                      self.handle_link_from_subschema_to_output(frame_mantis_nodes, ui_link, to_ui_node)
 | 
	
		
			
				|  |  | -                self.held_links.append(ui_link)
 | 
	
		
			
				|  |  | +                self.held_links.append(ui_link) # is this wise? Why am I doing this?
 | 
	
		
			
				|  |  |                  continue
 | 
	
		
			
				|  |  |              # HOLD these links until prep is done a little later
 | 
	
		
			
				|  |  |              if isinstance(to_ui_node, (SchemaConstOutput, NodeGroupOutput)) or isinstance(to_ui_node, SchemaArrayOutput):
 |