diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-04-24 09:13:35 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-04-24 09:13:35 +0400 |
commit | 5c4743b9ee2e98fc9ba8738fefddd7698034752d (patch) | |
tree | d10a9aefe6b00bf344239d9c9a293dd992028df4 /source/blender/blenkernel/intern | |
parent | 040a049fb17af2e690219ec7f48f601a6d2189c4 (diff) |
Another fix for node groups: Internal socket stack did not get complete initialization of the sockettype value, leading to wrong b/w outputs.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index b8b57b6bac0..4b40c07b7a9 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2244,16 +2244,40 @@ static void group_tag_used_outputs(bNode *gnode, bNodeStack *stack, bNodeStack * } } + /* non-composite trees do all nodes by default */ + if (ntree->type!=NTREE_COMPOSIT) + node->need_exec = 1; + + for(sock= node->inputs.first; sock; sock= sock->next) { + bNodeStack *ns = get_socket_stack(stack, sock, gin); + if (ns) { + ns->hasoutput = 1; + + /* sock type is needed to detect rgba or value or vector types */ + if(sock->link && sock->link->fromsock) + ns->sockettype= sock->link->fromsock->type; + else + sock->ns.sockettype= sock->type; + } + + if(sock->link) { + bNodeLink *link= sock->link; + /* this is the test for a cyclic case */ + if(link->fromnode && link->tonode) { + if(link->fromnode->level >= link->tonode->level && link->tonode->level!=0xFFF); + else { + node->need_exec= 0; + } + } + } + } + /* set stack types (for local stack entries) */ for(sock= node->outputs.first; sock; sock= sock->next) { - bNodeStack *ns = get_socket_stack(stack, sock, NULL); + bNodeStack *ns = get_socket_stack(stack, sock, gin); if (ns) ns->sockettype = sock->type; } - - /* non-composite trees do all nodes by default */ - if (ntree->type!=NTREE_COMPOSIT) - node->need_exec = 1; } } |