From fd511eb984a23b63b373e171666667c8213579c0 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 7 Oct 2009 22:05:30 +0000 Subject: Node Bugfixes: * Compo node backdrop works again. * Compo node previews and backdrop now get correct color management float to byte conversion. * Compo nodes got unecessarily recalculated while moving nodes. * Fix compo node viewer nodes not getting activated correctly. * Main compo node preview render computations are now outside of mutex lock, so better for multithreading. * Tex node outputs did not work in some files loaded from 2.4. * Change RNA updates to take into account groups that may be shared between multiple node trees. --- source/blender/nodes/intern/TEX_nodes/TEX_output.c | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'source/blender/nodes/intern/TEX_nodes/TEX_output.c') diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_output.c b/source/blender/nodes/intern/TEX_nodes/TEX_output.c index 140c31a7986..580b4cde8bf 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_output.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_output.c @@ -93,20 +93,23 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out) tex_input_rgba(&target->tr, in[0], ¶ms, cdata->thread); tex_do_preview(node, params.coord, &target->tr); } - else if(cdata->which_output == node->custom1) { - TexParams params; - params_from_cdata(¶ms, cdata); + else { + /* 0 means don't care, so just use first */ + if(cdata->which_output == node->custom1 || (cdata->which_output == 0 && node->custom1 == 1)) { + TexParams params; + params_from_cdata(¶ms, cdata); + + osa(tex_input_rgba, &target->tr, in[0], ¶ms, cdata->thread); - osa(tex_input_rgba, &target->tr, in[0], ¶ms, cdata->thread); - - target->tin = (target->tr + target->tg + target->tb) / 3.0f; - target->talpha = 1.0f; - - if(target->nor) { - if(in[1]->hasinput) - osa(tex_input_vec, target->nor, in[1], ¶ms, cdata->thread); - else - target->nor = 0; + target->tin = (target->tr + target->tg + target->tb) / 3.0f; + target->talpha = 1.0f; + + if(target->nor) { + if(in[1]->hasinput) + osa(tex_input_vec, target->nor, in[1], ¶ms, cdata->thread); + else + target->nor = 0; + } } } } -- cgit v1.2.3