From fc3be511f07a8107da5f9b0c8778d16295ced7cb Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 20 Jan 2014 20:29:05 +0100 Subject: 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. --- source/blender/editors/space_node/node_edit.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_node/node_edit.c') 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; -- cgit v1.2.3