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:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/nodes/texture/nodes/node_texture_mixRgb.c
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/nodes/texture/nodes/node_texture_mixRgb.c')
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c54
1 files changed, 29 insertions, 25 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index 047e427f478..667b1317ea4 100644
--- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -21,53 +21,57 @@
* \ingroup texnodes
*/
-
#include "node_texture_util.h"
#include "NOD_texture.h"
/* **************** MIX RGB ******************** */
static bNodeSocketTemplate inputs[] = {
- { SOCK_FLOAT, 1, N_("Factor"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE },
- { SOCK_RGBA, 1, N_("Color1"), 0.5f, 0.5f, 0.5f, 1.0f },
- { SOCK_RGBA, 1, N_("Color2"), 0.5f, 0.5f, 0.5f, 1.0f },
- { -1, 0, "" },
+ {SOCK_FLOAT, 1, N_("Factor"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
+ {SOCK_RGBA, 1, N_("Color1"), 0.5f, 0.5f, 0.5f, 1.0f},
+ {SOCK_RGBA, 1, N_("Color2"), 0.5f, 0.5f, 0.5f, 1.0f},
+ {-1, 0, ""},
};
static bNodeSocketTemplate outputs[] = {
- { SOCK_RGBA, 0, N_("Color") },
- { -1, 0, "" },
+ {SOCK_RGBA, 0, N_("Color")},
+ {-1, 0, ""},
};
static void colorfn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
{
- float fac = tex_input_value(in[0], p, thread);
- float col1[4], col2[4];
+ float fac = tex_input_value(in[0], p, thread);
+ float col1[4], col2[4];
- tex_input_rgba(col1, in[1], p, thread);
- tex_input_rgba(col2, in[2], p, thread);
+ tex_input_rgba(col1, in[1], p, thread);
+ tex_input_rgba(col2, in[2], p, thread);
- /* use alpha */
- if (node->custom2 & 1)
- fac *= col2[3];
+ /* use alpha */
+ if (node->custom2 & 1)
+ fac *= col2[3];
- CLAMP(fac, 0.0f, 1.0f);
+ CLAMP(fac, 0.0f, 1.0f);
- copy_v4_v4(out, col1);
- ramp_blend(node->custom1, out, fac, col2);
+ copy_v4_v4(out, col1);
+ ramp_blend(node->custom1, out, fac, col2);
}
-static void exec(void *data, int UNUSED(thread), bNode *node, bNodeExecData *execdata, bNodeStack **in, bNodeStack **out)
+static void exec(void *data,
+ int UNUSED(thread),
+ bNode *node,
+ bNodeExecData *execdata,
+ bNodeStack **in,
+ bNodeStack **out)
{
- tex_output(node, execdata, in, out[0], &colorfn, data);
+ tex_output(node, execdata, in, out[0], &colorfn, data);
}
void register_node_type_tex_mix_rgb(void)
{
- static bNodeType ntype;
+ static bNodeType ntype;
- tex_node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, 0);
- node_type_socket_templates(&ntype, inputs, outputs);
- node_type_label(&ntype, node_blend_label);
- node_type_exec(&ntype, NULL, NULL, exec);
+ tex_node_type_base(&ntype, TEX_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, 0);
+ node_type_socket_templates(&ntype, inputs, outputs);
+ node_type_label(&ntype, node_blend_label);
+ node_type_exec(&ntype, NULL, NULL, exec);
- nodeRegisterType(&ntype);
+ nodeRegisterType(&ntype);
}