[Bf-blender-cvs] [28e83bca9d9] master: Geometry Nodes: improve handling when the same socket is connected twice

Jacques Lucke noreply at git.blender.org
Thu Mar 11 11:35:20 CET 2021


Commit: 28e83bca9d997366aa174bf3ea55fe1dae8866e5
Author: Jacques Lucke
Date:   Thu Mar 11 11:35:02 2021 +0100
Branches: master
https://developer.blender.org/rB28e83bca9d997366aa174bf3ea55fe1dae8866e5

Geometry Nodes: improve handling when the same socket is connected twice

The multi-input-socket cannot be connected to the same socket twice currently.
However, it is still possible to achieve this using an intermediate reroute node.

In this case the origin socket should be listed twice in the `linked_sockets_` list.
Higher level functions can still deduplicate the list of they want.

===================================================================

M	source/blender/nodes/intern/node_tree_ref.cc

===================================================================

diff --git a/source/blender/nodes/intern/node_tree_ref.cc b/source/blender/nodes/intern/node_tree_ref.cc
index 775e16d0a29..a66b7b1d2fe 100644
--- a/source/blender/nodes/intern/node_tree_ref.cc
+++ b/source/blender/nodes/intern/node_tree_ref.cc
@@ -181,7 +181,7 @@ void NodeTreeRef::find_origins_skipping_reroutes(InputSocketRef &socket,
       this->find_origins_skipping_reroutes(*direct_origin->node_->inputs_[0], r_origins);
     }
     else {
-      r_origins.append_non_duplicates(direct_origin);
+      r_origins.append(direct_origin);
     }
   }
 }



More information about the Bf-blender-cvs mailing list