diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-03-20 21:56:12 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-03-20 21:56:12 +0400 |
commit | 9687c1fd2e23df2e0a66bdb0657a64608cd8d158 (patch) | |
tree | 7e6c7484e5cbeeb011a68321209cc85fb7cc4689 /source/blender/editors | |
parent | 8186c5e429304e7dbca8bcfc45a712bcbe00adc0 (diff) |
Remaining fix for #30606. Added a simple link limit check when replacing nodes and relinking inputs, to avoid double links on inputs.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_templates.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/space_node/node_templates.c b/source/blender/editors/space_node/node_templates.c index 781f37918fd..439a019b670 100644 --- a/source/blender/editors/space_node/node_templates.c +++ b/source/blender/editors/space_node/node_templates.c @@ -199,6 +199,9 @@ static void node_socket_add_replace(Main *bmain, bNodeTree *ntree, bNode *node_t for(sock_prev=node_prev->inputs.first; sock_prev; sock_prev=sock_prev->next) { for(sock_from=node_from->inputs.first; sock_from; sock_from=sock_from->next) { + if (nodeCountSocketLinks(ntree, sock_from) >= sock_from->limit) + continue; + if(strcmp(sock_prev->name, sock_from->name) == 0 && sock_prev->type == sock_from->type) { bNodeLink *link = sock_prev->link; |