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_distance.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_distance.c')
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_distance.c40
1 files changed, 22 insertions, 18 deletions
diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c
index fed8fe6b866..e7df8b3073a 100644
--- a/source/blender/nodes/texture/nodes/node_texture_distance.c
+++ b/source/blender/nodes/texture/nodes/node_texture_distance.c
@@ -21,46 +21,50 @@
* \ingroup texnodes
*/
-
#include <math.h>
#include "BLI_math.h"
#include "node_texture_util.h"
#include "NOD_texture.h"
static bNodeSocketTemplate inputs[] = {
- { SOCK_VECTOR, 1, N_("Coordinate 1"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
- { SOCK_VECTOR, 1, N_("Coordinate 2"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
- { -1, 0, "" },
+ {SOCK_VECTOR, 1, N_("Coordinate 1"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE},
+ {SOCK_VECTOR, 1, N_("Coordinate 2"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE},
+ {-1, 0, ""},
};
static bNodeSocketTemplate outputs[] = {
- { SOCK_FLOAT, 0, N_("Value") },
- { -1, 0, "" },
+ {SOCK_FLOAT, 0, N_("Value")},
+ {-1, 0, ""},
};
static void valuefn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
{
- float co1[3], co2[3];
+ float co1[3], co2[3];
- tex_input_vec(co1, in[0], p, thread);
- tex_input_vec(co2, in[1], p, thread);
+ tex_input_vec(co1, in[0], p, thread);
+ tex_input_vec(co2, in[1], p, thread);
- *out = len_v3v3(co2, co1);
+ *out = len_v3v3(co2, co1);
}
-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], &valuefn, data);
+ tex_output(node, execdata, in, out[0], &valuefn, data);
}
void register_node_type_tex_distance(void)
{
- static bNodeType ntype;
+ static bNodeType ntype;
- tex_node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, 0);
- node_type_socket_templates(&ntype, inputs, outputs);
- node_type_storage(&ntype, "", NULL, NULL);
- node_type_exec(&ntype, NULL, NULL, exec);
+ tex_node_type_base(&ntype, TEX_NODE_DISTANCE, "Distance", NODE_CLASS_CONVERTOR, 0);
+ node_type_socket_templates(&ntype, inputs, outputs);
+ node_type_storage(&ntype, "", NULL, NULL);
+ node_type_exec(&ntype, NULL, NULL, exec);
- nodeRegisterType(&ntype);
+ nodeRegisterType(&ntype);
}