diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-20 23:29:05 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-20 23:31:10 +0400 |
commit | fc3be511f07a8107da5f9b0c8778d16295ced7cb (patch) | |
tree | 7e95bc322da1678294ba1cda3c73c1cc6f495993 /source/blender/editors/space_node | |
parent | 04f81c8225f28ba9722cc06dc7f2d8a4d72a3fa3 (diff) |
Fix T37978: cycles nodes with multiple Material Output nodes not predictable.
Now it uses the last activated node like compositing does. This should have no
effect on existing files until you activate another output node there.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 6ff3b2b256c..ee18f945316 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -654,11 +654,12 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node) if (node->id && ELEM3(GS(node->id->name), ID_MA, ID_LA, ID_WO)) nodeClearActiveID(ntree, ID_TE); - if (node->type == SH_NODE_OUTPUT) { + if (ELEM4(node->type, SH_NODE_OUTPUT, SH_NODE_OUTPUT_MATERIAL, + SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP)) { bNode *tnode; for (tnode = ntree->nodes.first; tnode; tnode = tnode->next) - if (tnode->type == SH_NODE_OUTPUT) + if (tnode->type == node->type) tnode->flag &= ~NODE_DO_OUTPUT; node->flag |= NODE_DO_OUTPUT; |