Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Oeser <info@graphics-engineer.com>2022-01-18 18:20:43 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2022-01-18 22:23:39 +0300
commita5610da1d5ece3a3800d65cff1da926ca6ccf6c2 (patch)
treea3b18fdb8f412ec9353614d8c278ba50424d6859 /source/blender/editors/space_node/node_relationships.cc
parent9506dcf6758b4df7b01700c3f9cc61d05d93b50e (diff)
Fix T93413: Nodes 'Make Links' fails for multi input socket
This was the case for multi input sockets that have a link already. Since we have multi input sockets, the way we use `socket_is_available` is not really giving the expected result on these. When used for input sockets the intention is to find a free socket (either for noodle **replacement**, then it is always available, or just the next free available socket). Now I would think without the intention to replace an existing link, a multi input socket should still be available. From the inside of the function, the `replace` argument turns [namewise] to `allow_used`, which sounds a little different (so one might argue that if `allow_used` is `False` this should also trigger for already connected multi input sockets). In the end, this is an issue with the variable naming though, cant think of a usecase where the patch change would really go against intentions. Maniphest Tasks: T93413 Differential Revision: https://developer.blender.org/D13866
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.cc')
-rw-r--r--source/blender/editors/space_node/node_relationships.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc
index 441c63b9fc3..a5117fbd25b 100644
--- a/source/blender/editors/space_node/node_relationships.cc
+++ b/source/blender/editors/space_node/node_relationships.cc
@@ -212,7 +212,10 @@ static bool socket_is_available(bNodeTree *UNUSED(ntree), bNodeSocket *sock, con
}
if (!allow_used && (sock->flag & SOCK_IN_USE)) {
- return false;
+ /* Multi input sockets are available (even if used). */
+ if (!(sock->flag & SOCK_MULTI_INPUT)) {
+ return false;
+ }
}
return true;