Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_math.c')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_math.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_math.c b/source/blender/nodes/composite/nodes/node_composite_math.c
index 741c0e48806..3efb650c6eb 100644
--- a/source/blender/nodes/composite/nodes/node_composite_math.c
+++ b/source/blender/nodes/composite/nodes/node_composite_math.c
@@ -32,43 +32,6 @@ static bNodeSocketTemplate cmp_node_math_in[] = {
static bNodeSocketTemplate cmp_node_math_out[] = {{SOCK_FLOAT, 0, N_("Value")}, {-1, 0, ""}};
-static void node_shader_update_math(bNodeTree *UNUSED(ntree), bNode *node)
-{
- bNodeSocket *sock = BLI_findlink(&node->inputs, 1);
- nodeSetSocketAvailability(sock,
- !ELEM(node->custom1,
- NODE_MATH_SQRT,
- NODE_MATH_SIGN,
- NODE_MATH_CEIL,
- NODE_MATH_SINE,
- NODE_MATH_ROUND,
- NODE_MATH_FLOOR,
- NODE_MATH_COSINE,
- NODE_MATH_ARCSINE,
- NODE_MATH_TANGENT,
- NODE_MATH_ABSOLUTE,
- NODE_MATH_RADIANS,
- NODE_MATH_DEGREES,
- NODE_MATH_FRACTION,
- NODE_MATH_ARCCOSINE,
- NODE_MATH_ARCTANGENT) &&
- !ELEM(node->custom1,
- NODE_MATH_INV_SQRT,
- NODE_MATH_TRUNC,
- NODE_MATH_EXPONENT,
- NODE_MATH_COSH,
- NODE_MATH_SINH,
- NODE_MATH_TANH));
- bNodeSocket *sock2 = BLI_findlink(&node->inputs, 2);
- nodeSetSocketAvailability(sock2,
- ELEM(node->custom1,
- NODE_MATH_COMPARE,
- NODE_MATH_MULTIPLY_ADD,
- NODE_MATH_WRAP,
- NODE_MATH_SMOOTH_MIN,
- NODE_MATH_SMOOTH_MAX));
-}
-
void register_node_type_cmp_math(void)
{
static bNodeType ntype;
@@ -76,7 +39,7 @@ void register_node_type_cmp_math(void)
cmp_node_type_base(&ntype, CMP_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, 0);
node_type_socket_templates(&ntype, cmp_node_math_in, cmp_node_math_out);
node_type_label(&ntype, node_math_label);
- node_type_update(&ntype, node_shader_update_math);
+ node_type_update(&ntype, node_math_update);
nodeRegisterType(&ntype);
}