Browse Source

Fix: Blender freezes when using Array Get

this was happening specifically because of this:
 -A schema generates a number of bones and sends them into an array out
 - the array out goes straight into an Array Get
 - the array Get leads to a Matrix of xForm which depends (because of
      the array-get) on a bone from the schema
now at this point, the bone and array are prepped and ready. the Matrix
of xForm node, however, cannot execute because when it scans its
dependencies, it finds that the bone is not in the 'schema_solve_done'
set, because it was created inside of a schema.

I should look into going back to checking for .prepared == True, but I
don't know if I am using schema_solve_done for some other reason. have
to experiment.
I don't think there are any serious performance problems here, though
Joseph Brandenburg 5 months ago
parent
commit
4fab1045d5
1 changed files with 2 additions and 4 deletions
  1. 2 4
      readtree.py

+ 2 - 4
readtree.py

@@ -371,11 +371,9 @@ def parse_tree(base_tree, error_popups=False):
                 unsolved_schema.remove(n)
                 schema_solve_done.add(n)
                 for node in solved_nodes.values():
-                    #
-                    init_dependencies(node)
-                    init_connections(node)
-                    #
+                    init_dependencies(node); init_connections(node)
                     solve_layer.appendleft(node)
+                    schema_solve_done.add(node) # CRITICAL to prevent freezes.
                 for conn in n.hierarchy_connections:
                     if conn not in schema_solve_done and conn not in solve_layer:
                         solve_layer.appendleft(conn)