Преглед изворни кода

remove check for duplicate links entirely

in reference to fa180552658e56bbbe36ea2e2783e3e08a21c700
that commit did not fix the problem.

attempts at making a special carve-out specific precise solution
that only changes the circumstances for the specific problem case
has failed.
My suspicion is that the problem occurs in readtree rather
than in schema_solve. I have removed the check, since as
far as I know the only circumstance where this
happens is in schema, where it probably should happen.

I am replacing the "return None" with a message instead.
My guess is that this won't cause any problems...
I don't like making sweeping changes like this but I can't
cause any bugs in any of my test graphs.
Joseph Brandenburg пре 5 месеци
родитељ
комит
8d4874b111
1 измењених фајлова са 5 додато и 4 уклоњено
  1. 5 4
      base_definitions.py

+ 5 - 4
base_definitions.py

@@ -1045,10 +1045,11 @@ class NodeSocket:
             from_socket = self.name; to_socket = socket
         from_node.outputs[from_socket].is_linked = True
         to_node.inputs[to_socket].is_linked = True
-        if sort_id == 0: # otherwise it is an array and dupe links are valid.
-            for l in from_node.outputs[from_socket].links:
-                if l.to_node==to_node and l.to_socket==to_socket:
-                    return None
+        for l in from_node.outputs[from_socket].links:
+            if l.to_node==to_node and l.to_socket==to_socket:
+                prPurple( "Mantis has attempted to create a duplicate link. "
+                         f"{from_node.signature[-1]}::{from_socket} ==> {to_node.signature[-1]}::{to_socket}"
+                         "\nThis is not a bug.")
         new_link = NodeLink(
                 from_node,
                 from_socket,