Эх сурвалжийг харах

Fix: Lazy Parents not working

they weren't working because the sockets were not marked as linked.
Joseph Brandenburg 7 сар өмнө
parent
commit
84e4991775
1 өөрчлөгдсөн 2 нэмэгдсэн , 0 устгасан
  1. 2 0
      readtree.py

+ 2 - 0
readtree.py

@@ -63,6 +63,7 @@ def insert_lazy_parents(nc):
                 if from_link.to_node == nc and from_link.to_socket == "Relationship":
                 if from_link.to_node == nc and from_link.to_socket == "Relationship":
                     break # this is it
                     break # this is it
             from_link.to_node = inherit_nc; from_link.to_socket="Parent"
             from_link.to_node = inherit_nc; from_link.to_socket="Parent"
+            from_link.to_node.inputs[from_link.to_socket].is_linked=True
             
             
             links=[]
             links=[]
             while (nc.inputs["Relationship"].links):
             while (nc.inputs["Relationship"].links):
@@ -70,6 +71,7 @@ def insert_lazy_parents(nc):
                 if to_link.from_node == from_nc and to_link.from_socket == "xForm Out":
                 if to_link.from_node == from_nc and to_link.from_socket == "xForm Out":
                     continue # don't keep this one
                     continue # don't keep this one
                 links.append(to_link)
                 links.append(to_link)
+                to_link.from_node.outputs[from_link.from_socket].is_linked=True
             
             
             nc.inputs["Relationship"].links=links
             nc.inputs["Relationship"].links=links
             link=NodeLink(from_node=inherit_nc, from_socket="Inheritance", to_node=nc, to_socket="Relationship")
             link=NodeLink(from_node=inherit_nc, from_socket="Inheritance", to_node=nc, to_socket="Relationship")