diff options
author | Matthias Ellerbeck <voyager25> | 2018-03-19 23:30:33 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-03-19 23:52:49 +0300 |
commit | 8ecf35d850fd17d44a60bcbea723d542d2139774 (patch) | |
tree | 904b923d195ed49a3bf055e579e23cb6f468d545 | |
parent | 148b0fef0980ab1263823ef4220d25caa0918d82 (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
-rw-r--r-- | source/blender/nodes/intern/node_util.c | 5 |
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 |