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
path: root/source
diff options
context:
space:
mode:
authorMatthias Ellerbeck <voyager25>2018-03-19 23:30:33 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-03-19 23:52:49 +0300
commit8ecf35d850fd17d44a60bcbea723d542d2139774 (patch)
tree904b923d195ed49a3bf055e579e23cb6f468d545 /source
parent148b0fef0980ab1263823ef4220d25caa0918d82 (diff)
Fix T54240: automatic node link moving should take into account type.
Without this a "Clearcoat" link could be moved to "Clearcoat Normal" for example, which doesn't make much sense. Differential Revision: https://developer.blender.org/D3105
Diffstat (limited to 'source')
-rw-r--r--source/blender/nodes/intern/node_util.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/nodes/intern/node_util.c b/source/blender/nodes/intern/node_util.c
index 43d4136d556..9f04c12fb5e 100644
--- a/source/blender/nodes/intern/node_util.c
+++ b/source/blender/nodes/intern/node_util.c
@@ -124,6 +124,11 @@ void node_filter_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int m
/* test if two sockets are interchangeable */
static bool node_link_socket_match(bNodeSocket *a, bNodeSocket *b)
{
+ /* check if sockets are of the same type */
+ if (a->typeinfo != b->typeinfo) {
+ return false;
+ }
+
/* tests if alphabetic prefix matches
* this allows for imperfect matches, such as numeric suffixes,
* like Color1/Color2