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
This commit is contained in:
parent
148b0fef09
commit
8ecf35d850
Notes:
blender-bot
2023-02-14 08:28:46 +01:00
Referenced by issue #54240, Node editor: replacing connection to principled BSDF clearcoat normal sends old connection to clearcoat weight
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue