Prechádzať zdrojové kódy

Fix: Morph Deformer update quit working

seems to be the result of boneheaded carelessness when cleaning up a while back.
shameful
embarassing
Joseph Brandenburg 5 mesiacov pred
rodič
commit
ecf02d3510
2 zmenil súbory, kde vykonal 9 pridanie a 3 odobranie
  1. 2 1
      deformer_definitions.py
  2. 7 2
      misc_nodes.py

+ 2 - 1
deformer_definitions.py

@@ -176,8 +176,9 @@ class DeformerMorphTargetDeform(Node, DeformerNode):
         self.initialized = True
 
     def update(self):
-        if self.id_data.is_executing:
+        if self.id_data.is_exporting:
             return # so that we don't update it while saving/loading the tree
+        self.update_morph_deformer(force=False)
     
     def display_update(self, parsed_tree, context):
         if self.inputs["Deformer"].is_linked:

+ 7 - 2
misc_nodes.py

@@ -139,16 +139,22 @@ def array_choose_relink(node, indices, array_input, output, ):
     """
         Used to choose the correct link to send out of an array-choose node.
     """
+    prGreen(node)
+    for l in node.inputs[array_input].links:
+        print(l)
     keep_links = []
     for index in indices:
+        prOrange(index)
         l = node.inputs[array_input].links[index]
         keep_links.append(l)
     for link in node.outputs[output].links:
+        prOrange(link)
         to_node = link.to_node
         for l in keep_links:
             new_link = l.from_node.outputs[l.from_socket].connect(to_node, link.to_socket)
             array_link_init_hierarchy(new_link)
             node.rerouted.append(new_link) # so I can access this in Schema Solve
+            prPurple(new_link)
         link.die()
 
 
@@ -1719,8 +1725,7 @@ class UtilityArrayGet(MantisNode):
         self.rerouted=[]
 
     def bPrepare(self, bContext = None,):
-        if len(self.hierarchy_dependencies)==0 and len(self.hierarchy_connections)==0 and \
-                 len(self.connections)==0 and len(self.dependencies)==0:
+        if len(self.rerouted)>0:
             self.prepared, self.executed = True, True
             return #Either it is already done or it doesn't matter.
         elif self.prepared == False: