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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-05-13 09:41:48 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2014-05-13 09:41:48 +0400
commitaebcb3bab9679bbcfd6b881fdd1f42b8708450db (patch)
treeb45714eacaa2c4f3ad95d3c5033716db6e59e680
parentf14df2977750531956d0048576a27b58ca5ea571 (diff)
Tweak for node socket swapping: don't un-hide sockets automatically.
This was suggested by @zanqdo on IRC. Hiding sockets is a user choice (not to be confused with "unavailable" disabled sockets). Hidden sockets suddenly popping up when linking is confusing and intransparent, better just ignore them for the swapping.
-rw-r--r--source/blender/editors/space_node/node_relationships.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index 6a0e1f35d24..97a2383c03f 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -461,7 +461,7 @@ static bNodeSocket *node_find_linkable_socket(bNodeTree *ntree, bNode *node, bNo
sock = cur->next ? cur->next : first; /* wrap around the list end */
while (sock != cur) {
- if (node_link_socket_match(sock, cur)) {
+ if (!nodeSocketIsHidden(sock) && node_link_socket_match(sock, cur)) {
int link_count = node_count_links(ntree, sock);
/* take +1 into account since we would add a new link */
if (link_count + 1 <= sock->limit)
@@ -490,7 +490,6 @@ static void node_remove_extra_links(SpaceNode *snode, bNodeLink *link, bool use_
if (new_from && new_from != from) {
/* redirect existing link */
tlink->fromsock = new_from;
- new_from->flag &= ~SOCK_HIDDEN;
}
else if (!new_from) {
/* no possible replacement, remove tlink */
@@ -504,7 +503,6 @@ static void node_remove_extra_links(SpaceNode *snode, bNodeLink *link, bool use_
if (new_to && new_to != to) {
/* redirect existing link */
tlink->tosock = new_to;
- new_to->flag &= ~SOCK_HIDDEN;
}
else if (!new_to) {
/* no possible replacement, remove tlink */