From 527907662822fea5727bb5deecb96c9f1017adbd Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Wed, 7 Sep 2011 06:17:28 +0000 Subject: [PATCH] Fix for value node limits. The value input nodes (like rgb input nodes) use the output value out their first socket for the button value. This needs explicitly set range limits to allow meaningful user input. --- source/blender/nodes/composite/nodes/node_composite_value.c | 2 ++ source/blender/nodes/shader/nodes/node_shader_value.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/source/blender/nodes/composite/nodes/node_composite_value.c b/source/blender/nodes/composite/nodes/node_composite_value.c index 0bb558cfa9d..80b71b9e65d 100644 --- a/source/blender/nodes/composite/nodes/node_composite_value.c +++ b/source/blender/nodes/composite/nodes/node_composite_value.c @@ -46,6 +46,8 @@ static void node_composit_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNod bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; /* uses the default value of the output socket, must be initialized here */ dval->value = 0.5f; + dval->min = -FLT_MAX; + dval->max = FLT_MAX; } static void node_composit_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out) diff --git a/source/blender/nodes/shader/nodes/node_shader_value.c b/source/blender/nodes/shader/nodes/node_shader_value.c index bbd3f8fc242..aadbd034e10 100644 --- a/source/blender/nodes/shader/nodes/node_shader_value.c +++ b/source/blender/nodes/shader/nodes/node_shader_value.c @@ -46,6 +46,8 @@ static void node_shader_init_value(bNodeTree *UNUSED(ntree), bNode *node, bNodeT bNodeSocketValueFloat *dval= (bNodeSocketValueFloat*)sock->default_value; /* uses the default value of the output socket, must be initialized here */ dval->value = 0.5f; + dval->min = -FLT_MAX; + dval->max = FLT_MAX; } static void node_shader_exec_value(void *UNUSED(data), bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)