diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/nodes/texture/nodes/node_texture_translate.c | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (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_translate.c')
-rw-r--r-- | source/blender/nodes/texture/nodes/node_texture_translate.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c index d4fc045a383..c53077d792b 100644 --- a/source/blender/nodes/texture/nodes/node_texture_translate.c +++ b/source/blender/nodes/texture/nodes/node_texture_translate.c @@ -21,48 +21,52 @@ * \ingroup texnodes */ - #include <math.h> #include "node_texture_util.h" #include "NOD_texture.h" static bNodeSocketTemplate inputs[] = { - { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, - { SOCK_VECTOR, 1, N_("Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_TRANSLATION }, - { -1, 0, "" }, + {SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f}, + {SOCK_VECTOR, 1, N_("Offset"), 0.0f, 0.0f, 0.0f, 0.0f, -10000.0f, 10000.0f, PROP_TRANSLATION}, + {-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 *UNUSED(node), bNodeStack **in, short thread) { - float offset[3], new_co[3]; - TexParams np = *p; - np.co = new_co; + float offset[3], new_co[3]; + TexParams np = *p; + np.co = new_co; - tex_input_vec(offset, in[1], p, thread); + tex_input_vec(offset, in[1], p, thread); - new_co[0] = p->co[0] + offset[0]; - new_co[1] = p->co[1] + offset[1]; - new_co[2] = p->co[2] + offset[2]; + new_co[0] = p->co[0] + offset[0]; + new_co[1] = p->co[1] + offset[1]; + new_co[2] = p->co[2] + offset[2]; - tex_input_rgba(out, in[0], &np, thread); + tex_input_rgba(out, in[0], &np, thread); } -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_translate(void) { - static bNodeType ntype; + static bNodeType ntype; - tex_node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, 0); - node_type_socket_templates(&ntype, inputs, outputs); - node_type_exec(&ntype, NULL, NULL, exec); + tex_node_type_base(&ntype, TEX_NODE_TRANSLATE, "Translate", NODE_CLASS_DISTORT, 0); + node_type_socket_templates(&ntype, inputs, outputs); + node_type_exec(&ntype, NULL, NULL, exec); - nodeRegisterType(&ntype); + nodeRegisterType(&ntype); } |