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.
This commit is contained in:
Lukas Toenne
2011-09-07 06:17:28 +00:00
parent 9161d3ce4b
commit 5279076628
2 changed files with 4 additions and 0 deletions

View File

@@ -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)

View File

@@ -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)