Joseph Brandenburg 4 日 前
親
コミット
ec80582aa4
3 ファイル変更、4 行追加、6 行削除
  1. 2 1
      execution/schema_solve.py
  2. 2 3
      internal_nodes.py
  3. 0 2
      socket_definitions.py

+ 2 - 1
execution/schema_solve.py

@@ -182,7 +182,8 @@ class SchemaSolver:
             # add the index and length socket constants. Only the first one needs Length
             #  (it's best to avoid having multiple places to read single-source values.)
             interface.parameters['Index'] = i
-            if i == 0: interface.parameters['Length'] = self.solve_length
+            # This has already been fully resolved, we do not need to relink anything.
+            if i == 0: interface.parameters['Schema Length'] = self.solve_length
             # the GroupInterface will initialize with the right sockets, but we still have to link them
             if in_out == 'SCHEMA_INPUT': # Take the links into the schema and plug them here
                 for item in items_tree:

+ 2 - 3
internal_nodes.py

@@ -188,10 +188,7 @@ class GroupInterface(MantisNode):
         
         # the index and length are like constant inputs.
         if self.in_out == 'SCHEMA_INPUT':
-            # this one is here because the tree expects it when linking things together
             self.outputs["Schema Length"] = NodeSocket(is_input=False, node=self, name="Schema Length")
-            # HACK this one here is just there for overlays, really, doesn't hurt
-            self.outputs["Length"] = self.outputs["Schema Length"]
         if 'SCHEMA' in self.in_out: 
             self.outputs["Index"]  = NodeSocket(is_input=False, node=self, name="Index")
                
@@ -232,6 +229,8 @@ class GroupInterface(MantisNode):
             return tree.interface.items_tree
 
     def evaluate_input(self, input_name, index=0):
+        # I'm hardcoding this so that the schema length overlay is available as just 'length'
+        if input_name == 'Length': input_name = 'Schema'
         value = super().evaluate_input(input_name, index)
         # This node should cache the result for faster lookup later
         self.parameters[input_name] = value

+ 0 - 2
socket_definitions.py

@@ -63,7 +63,6 @@ def socket_update_get_root_tree(self, context):
     return root_tree
 
 def overlay_toggle_update(self, context):
-    prRed("BENIS BENIS BENIS")
     root_tree = socket_update_get_root_tree(self, context)
     if root_tree is None: return
     parsed_tree = self.node.id_data.parsed_tree
@@ -74,7 +73,6 @@ def overlay_toggle_update(self, context):
     # For now I am not gonna try to resolve the overlay value from the UI.
     
 def overlay_text_update(self, context):
-    prPurple("BENIS BENIS BENIS")
     root_tree = socket_update_get_root_tree(self, context)
     if root_tree is None: return
     # have to check each one. see default_update NOTE