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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-10-29 05:09:12 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2012-10-29 05:09:12 +0400
commit15ed8343437c6b304de72cd14591455da1d5b3ec (patch)
treecbe40f76668f5e8539744c4d2f8aeaa0ded72f52 /source/blender/nodes/texture
parent5acd5d14970c829c2873623716a67beeb6da5278 (diff)
parentdd106b5c7a129e00bebe121c4da8cb90a16d48cb (diff)
Merged changes in the trunk up to revision 51718.
Conflicts resolved: source/blender/blenloader/intern/readfile.c source/blender/makesrna/intern/rna_scene.c release/datafiles/startup.blend
Diffstat (limited to 'source/blender/nodes/texture')
-rw-r--r--source/blender/nodes/texture/node_texture_tree.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_at.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_bricks.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_checker.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_common.c125
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_compose.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_coord.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_curves.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_decompose.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_distance.c6
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_hueSatVal.c14
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_image.c2
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_invert.c12
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_math.c18
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_mixRgb.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_output.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_proc.c24
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_rotate.c10
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_scale.c10
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_texture.c4
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_translate.c10
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToNor.c12
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_valToRgb.c8
-rw-r--r--source/blender/nodes/texture/nodes/node_texture_viewer.c2
24 files changed, 86 insertions, 211 deletions
diff --git a/source/blender/nodes/texture/node_texture_tree.c b/source/blender/nodes/texture/node_texture_tree.c
index 1bfd88d3af7..ba94531c259 100644
--- a/source/blender/nodes/texture/node_texture_tree.c
+++ b/source/blender/nodes/texture/node_texture_tree.c
@@ -134,7 +134,7 @@ bNodeTreeType ntreeType_Texture = {
/* update */ update,
/* update_node */ NULL,
/* validate_link */ NULL,
- /* internal_connect */ node_internal_connect_default
+ /* update_internal_links */ node_update_internal_links_default
};
int ntreeTexTagAnimated(bNodeTree *ntree)
diff --git a/source/blender/nodes/texture/nodes/node_texture_at.c b/source/blender/nodes/texture/nodes/node_texture_at.c
index 9e557705b3f..4c2d276b902 100644
--- a/source/blender/nodes/texture/nodes/node_texture_at.c
+++ b/source/blender/nodes/texture/nodes/node_texture_at.c
@@ -33,12 +33,12 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Texture"), 0.0f, 0.0f, 0.0f, 1.0f },
{ SOCK_VECTOR, 1, N_("Coordinates"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Texture") },
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_bricks.c b/source/blender/nodes/texture/nodes/node_texture_bricks.c
index c575547b3ce..b4f81f08e43 100644
--- a/source/blender/nodes/texture/nodes/node_texture_bricks.c
+++ b/source/blender/nodes/texture/nodes/node_texture_bricks.c
@@ -35,7 +35,7 @@
#include <math.h>
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Bricks 1"), 0.596f, 0.282f, 0.0f, 1.0f },
{ SOCK_RGBA, 1, N_("Bricks 2"), 0.632f, 0.504f, 0.05f, 1.0f },
{ SOCK_RGBA, 1, N_("Mortar"), 0.0f, 0.0f, 0.0f, 1.0f },
@@ -45,7 +45,7 @@ static bNodeSocketTemplate inputs[]= {
{ SOCK_FLOAT, 1, N_("Row Height"), 0.25f, 0.0f, 0.0f, 0.0f, 0.001f, 99.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Color")},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_checker.c b/source/blender/nodes/texture/nodes/node_texture_checker.c
index cd9c3170cf7..1f653d1f7b9 100644
--- a/source/blender/nodes/texture/nodes/node_texture_checker.c
+++ b/source/blender/nodes/texture/nodes/node_texture_checker.c
@@ -34,13 +34,13 @@
#include "NOD_texture.h"
#include <math.h>
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Color1"), 1.0f, 0.0f, 0.0f, 1.0f },
{ SOCK_RGBA, 1, N_("Color2"), 1.0f, 1.0f, 1.0f, 1.0f },
{ SOCK_FLOAT, 1, N_("Size"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 100.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Color") },
{ -1, 0, "" }
};
@@ -62,7 +62,7 @@ static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **
}
else {
tex_input_rgba(out, in[1], p, thread);
- }
+ }
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
diff --git a/source/blender/nodes/texture/nodes/node_texture_common.c b/source/blender/nodes/texture/nodes/node_texture_common.c
index 1eaf9b2b0fe..41bfd0ae00a 100644
--- a/source/blender/nodes/texture/nodes/node_texture_common.c
+++ b/source/blender/nodes/texture/nodes/node_texture_common.c
@@ -148,128 +148,3 @@ void register_node_type_tex_group(bNodeTreeType *ttype)
nodeRegisterType(ttype, &ntype);
}
-
-
-/**** FOR LOOP ****/
-
-#if 0 /* XXX loop nodes don't work nicely with current trees */
-static void forloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
-{
- bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
- bNodeThreadStack *nts;
- int iterations= (int)in[0]->vec[0];
- bNodeSocket *sock;
- bNodeStack *ns;
- int iteration;
-
- /* XXX same behavior as trunk: all nodes inside group are executed.
- * it's stupid, but just makes it work. compo redesign will do this better.
- */
- {
- bNode *inode;
- for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
- inode->need_exec = 1;
- }
-
- nts = ntreeGetThreadStack(exec, thread);
-
- /* "Iteration" socket */
- sock = exec->nodetree->inputs.first;
- ns = node_get_socket_stack(nts->stack, sock);
-
-// group_copy_inputs(node, in, nts->stack);
- for (iteration=0; iteration < iterations; ++iteration) {
- /* first input contains current iteration counter */
- ns->vec[0] = (float)iteration;
- ns->vec[1]=ns->vec[2]=ns->vec[3] = 0.0f;
-
-// if (iteration > 0)
-// loop_init_iteration(exec->nodetree, nts->stack);
-// ntreeExecThreadNodes(exec, nts, data, thread);
- }
-// loop_copy_outputs(node, in, out, exec->stack);
-
- ntreeReleaseThreadStack(nts);
-}
-
-void register_node_type_tex_forloop(bNodeTreeType *ttype)
-{
- static bNodeType ntype;
-
- node_type_base(ttype, &ntype, NODE_FORLOOP, "For", NODE_CLASS_GROUP, NODE_OPTIONS);
- node_type_socket_templates(&ntype, NULL, NULL);
- node_type_size(&ntype, 120, 60, 200);
- node_type_label(&ntype, node_group_label);
- node_type_init(&ntype, node_forloop_init);
- node_type_valid(&ntype, node_group_valid);
- node_type_template(&ntype, node_forloop_template);
- node_type_update(&ntype, NULL, node_group_verify);
- node_type_tree(&ntype, node_forloop_init_tree, node_loop_update_tree);
- node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
- node_type_exec_new(&ntype, group_initexec, group_freeexec, forloop_execute);
-
- nodeRegisterType(ttype, &ntype);
-}
-#endif
-
-/**** WHILE LOOP ****/
-
-#if 0 /* XXX loop nodes don't work nicely with current trees */
-static void whileloop_execute(void *data, int thread, struct bNode *node, void *nodedata, struct bNodeStack **in, struct bNodeStack **out)
-{
- bNodeTreeExec *exec= (bNodeTreeExec*)nodedata;
- bNodeThreadStack *nts;
- int condition= (in[0]->vec[0] > 0.0f);
- bNodeSocket *sock;
- bNodeStack *ns;
- int iteration;
-
- /* XXX same behavior as trunk: all nodes inside group are executed.
- * it's stupid, but just makes it work. compo redesign will do this better.
- */
- {
- bNode *inode;
- for (inode=exec->nodetree->nodes.first; inode; inode=inode->next)
- inode->need_exec = 1;
- }
-
- nts = ntreeGetThreadStack(exec, thread);
-
- /* "Condition" socket */
- sock = exec->nodetree->outputs.first;
- ns = node_get_socket_stack(nts->stack, sock);
-
- iteration = 0;
-// group_copy_inputs(node, in, nts->stack);
- while (condition && iteration < node->custom1) {
-// if (iteration > 0)
-// loop_init_iteration(exec->nodetree, nts->stack);
-// ntreeExecThreadNodes(exec, nts, data, thread);
-
- condition = (ns->vec[0] > 0.0f);
- ++iteration;
- }
-// loop_copy_outputs(node, in, out, exec->stack);
-
- ntreeReleaseThreadStack(nts);
-}
-
-void register_node_type_tex_whileloop(bNodeTreeType *ttype)
-{
- static bNodeType ntype;
-
- node_type_base(ttype, &ntype, NODE_WHILELOOP, "While", NODE_CLASS_GROUP, NODE_OPTIONS);
- node_type_socket_templates(&ntype, NULL, NULL);
- node_type_size(&ntype, 120, 60, 200);
- node_type_label(&ntype, node_group_label);
- node_type_init(&ntype, node_whileloop_init);
- node_type_valid(&ntype, node_group_valid);
- node_type_template(&ntype, node_whileloop_template);
- node_type_update(&ntype, NULL, node_group_verify);
- node_type_tree(&ntype, node_whileloop_init_tree, node_loop_update_tree);
- node_type_group_edit(&ntype, node_group_edit_get, node_group_edit_set, node_group_edit_clear);
- node_type_exec_new(&ntype, group_initexec, group_freeexec, whileloop_execute);
-
- nodeRegisterType(ttype, &ntype);
-}
-#endif
diff --git a/source/blender/nodes/texture/nodes/node_texture_compose.c b/source/blender/nodes/texture/nodes/node_texture_compose.c
index 77521190590..25da4f19e52 100644
--- a/source/blender/nodes/texture/nodes/node_texture_compose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_compose.c
@@ -33,14 +33,14 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_FLOAT, 1, N_("Red"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Green"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Blue"), 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Alpha"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_UNSIGNED },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Color") },
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_coord.c b/source/blender/nodes/texture/nodes/node_texture_coord.c
index 2add5c820eb..971520ebc38 100644
--- a/source/blender/nodes/texture/nodes/node_texture_coord.c
+++ b/source/blender/nodes/texture/nodes/node_texture_coord.c
@@ -33,7 +33,7 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_VECTOR, 0, N_("Coordinates") },
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_curves.c b/source/blender/nodes/texture/nodes/node_texture_curves.c
index 6ccb5e1e83f..5980f938938 100644
--- a/source/blender/nodes/texture/nodes/node_texture_curves.c
+++ b/source/blender/nodes/texture/nodes/node_texture_curves.c
@@ -36,7 +36,7 @@
/* **************** CURVE Time ******************** */
/* custom1 = sfra, custom2 = efra */
-static bNodeSocketTemplate time_outputs[]= {
+static bNodeSocketTemplate time_outputs[] = {
{ SOCK_FLOAT, 0, N_("Value") },
{ -1, 0, "" }
};
@@ -83,12 +83,12 @@ void register_node_type_tex_curve_time(bNodeTreeType *ttype)
}
/* **************** CURVE RGB ******************** */
-static bNodeSocketTemplate rgb_inputs[]= {
+static bNodeSocketTemplate rgb_inputs[] = {
{ SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketTemplate rgb_outputs[]= {
+static bNodeSocketTemplate rgb_outputs[] = {
{ SOCK_RGBA, 0, N_("Color")},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_decompose.c b/source/blender/nodes/texture/nodes/node_texture_decompose.c
index eae34e2ce47..a2875c31d9e 100644
--- a/source/blender/nodes/texture/nodes/node_texture_decompose.c
+++ b/source/blender/nodes/texture/nodes/node_texture_decompose.c
@@ -34,11 +34,11 @@
#include "NOD_texture.h"
#include <math.h>
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_FLOAT, 0, N_("Red") },
{ SOCK_FLOAT, 0, N_("Green") },
{ SOCK_FLOAT, 0, N_("Blue") },
diff --git a/source/blender/nodes/texture/nodes/node_texture_distance.c b/source/blender/nodes/texture/nodes/node_texture_distance.c
index 29f08a0ded0..8c3b1555d5d 100644
--- a/source/blender/nodes/texture/nodes/node_texture_distance.c
+++ b/source/blender/nodes/texture/nodes/node_texture_distance.c
@@ -35,13 +35,13 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+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, "" }
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_FLOAT, 0, N_("Value") },
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
index 6863eab9150..b5e9969a830 100644
--- a/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
+++ b/source/blender/nodes/texture/nodes/node_texture_hueSatVal.c
@@ -34,7 +34,7 @@
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_FLOAT, 1, N_("Hue"), 0.0f, 0.0f, 0.0f, 0.0f, -0.5f, 0.5f, PROP_NONE },
{ SOCK_FLOAT, 1, N_("Saturation"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR },
{ SOCK_FLOAT, 1, N_("Value"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 2.0f, PROP_FACTOR },
@@ -42,7 +42,7 @@ static bNodeSocketTemplate inputs[]= {
{ SOCK_RGBA, 1, N_("Color"), 0.8f, 0.8f, 0.8f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Color") },
{ -1, 0, "" }
};
@@ -56,14 +56,14 @@ static void do_hue_sat_fac(bNode *UNUSED(node), float *out, float hue, float sat
hsv[0]+= (hue - 0.5f);
if (hsv[0]>1.0f) hsv[0]-=1.0f; else if (hsv[0]<0.0f) hsv[0]+= 1.0f;
hsv[1]*= sat;
- if (hsv[1]>1.0f) hsv[1]= 1.0f; else if (hsv[1]<0.0f) hsv[1]= 0.0f;
+ if (hsv[1]>1.0f) hsv[1] = 1.0f; else if (hsv[1]<0.0f) hsv[1] = 0.0f;
hsv[2]*= val;
- if (hsv[2]>1.0f) hsv[2]= 1.0f; else if (hsv[2]<0.0f) hsv[2]= 0.0f;
+ if (hsv[2]>1.0f) hsv[2] = 1.0f; else if (hsv[2]<0.0f) hsv[2] = 0.0f;
hsv_to_rgb(hsv[0], hsv[1], hsv[2], col, col+1, col+2);
- out[0]= mfac*in[0] + fac*col[0];
- out[1]= mfac*in[1] + fac*col[1];
- out[2]= mfac*in[2] + fac*col[2];
+ out[0] = mfac*in[0] + fac*col[0];
+ out[1] = mfac*in[1] + fac*col[1];
+ out[2] = mfac*in[2] + fac*col[2];
}
else {
copy_v4_v4(out, in);
diff --git a/source/blender/nodes/texture/nodes/node_texture_image.c b/source/blender/nodes/texture/nodes/node_texture_image.c
index 7ce91c37295..f3fdaf0bb64 100644
--- a/source/blender/nodes/texture/nodes/node_texture_image.c
+++ b/source/blender/nodes/texture/nodes/node_texture_image.c
@@ -33,7 +33,7 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Image")},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_invert.c b/source/blender/nodes/texture/nodes/node_texture_invert.c
index 0339c3f0cf2..9c2963d2dc2 100644
--- a/source/blender/nodes/texture/nodes/node_texture_invert.c
+++ b/source/blender/nodes/texture/nodes/node_texture_invert.c
@@ -34,14 +34,14 @@
#include "NOD_texture.h"
/* **************** INVERT ******************** */
-static bNodeSocketTemplate inputs[]= {
- { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
- { -1, 0, "" }
+static bNodeSocketTemplate inputs[] = {
+ { SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
- { SOCK_RGBA, 0, N_("Color")},
- { -1, 0, "" }
+static bNodeSocketTemplate outputs[] = {
+ { SOCK_RGBA, 0, N_("Color")},
+ { -1, 0, "" }
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
diff --git a/source/blender/nodes/texture/nodes/node_texture_math.c b/source/blender/nodes/texture/nodes/node_texture_math.c
index 36e9cac0827..95d70ccc7d6 100644
--- a/source/blender/nodes/texture/nodes/node_texture_math.c
+++ b/source/blender/nodes/texture/nodes/node_texture_math.c
@@ -35,15 +35,15 @@
/* **************** SCALAR MATH ******************** */
-static bNodeSocketTemplate inputs[]= {
- { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
- { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
- { -1, 0, "" }
+static bNodeSocketTemplate inputs[] = {
+ { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
+ { SOCK_FLOAT, 1, N_("Value"), 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE},
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
- { SOCK_FLOAT, 0, N_("Value")},
- { -1, 0, "" }
+static bNodeSocketTemplate outputs[] = {
+ { SOCK_FLOAT, 0, N_("Value")},
+ { -1, 0, "" }
};
static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, short thread)
@@ -112,7 +112,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
{
/* Only raise negative numbers by full integers */
if ( in0 >= 0 ) {
- out[0]= pow(in0, in1);
+ out[0] = pow(in0, in1);
}
else {
float y_mod_1 = fmod(in1, 1);
@@ -178,7 +178,7 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
fprintf(stderr,
"%s:%d: unhandeld value in switch statement: %d\n",
__FILE__, __LINE__, node->custom1);
- }
+ }
}
static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
diff --git a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
index bf6cb7a3262..fe04854c734 100644
--- a/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_mixRgb.c
@@ -34,13 +34,13 @@
#include "NOD_texture.h"
/* **************** MIX RGB ******************** */
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_FLOAT, 1, N_("Factor"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR },
{ 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[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Color") },
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_output.c b/source/blender/nodes/texture/nodes/node_texture_output.c
index fdd3b97ad59..2f5efe8c45e 100644
--- a/source/blender/nodes/texture/nodes/node_texture_output.c
+++ b/source/blender/nodes/texture/nodes/node_texture_output.c
@@ -34,7 +34,7 @@
#include "NOD_texture.h"
/* **************** COMPOSITE ******************** */
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, N_("Normal"), 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION},
{ -1, 0, "" }
@@ -170,7 +170,7 @@ void register_node_type_tex_output(bNodeTreeType *ttype)
node_type_exec(&ntype, exec);
/* Do not allow muting output. */
- node_type_internal_connect(&ntype, NULL);
+ node_type_internal_links(&ntype, NULL);
nodeRegisterType(ttype, &ntype);
}
diff --git a/source/blender/nodes/texture/nodes/node_texture_proc.c b/source/blender/nodes/texture/nodes/node_texture_proc.c
index 1f724292661..8876d98b9b2 100644
--- a/source/blender/nodes/texture/nodes/node_texture_proc.c
+++ b/source/blender/nodes/texture/nodes/node_texture_proc.c
@@ -40,12 +40,12 @@
*/
-static bNodeSocketTemplate outputs_both[]= {
+static bNodeSocketTemplate outputs_both[] = {
{ SOCK_RGBA, 0, N_("Color"), 1.0f, 0.0f, 0.0f, 1.0f },
{ SOCK_VECTOR, 0, N_("Normal"), 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs_color_only[]= {
+static bNodeSocketTemplate outputs_color_only[] = {
{ SOCK_RGBA, 0, N_("Color") },
{ -1, 0, "" }
};
@@ -138,7 +138,7 @@ static int count_outputs(bNode *node)
/* --- VORONOI -- */
-static bNodeSocketTemplate voronoi_inputs[]= {
+static bNodeSocketTemplate voronoi_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("W1"), 1.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE },
{ SOCK_FLOAT, 1, N_("W2"), 0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_NONE },
@@ -163,7 +163,7 @@ static void voronoi_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short th
ProcDef(voronoi)
/* --- BLEND -- */
-static bNodeSocketTemplate blend_inputs[]= {
+static bNodeSocketTemplate blend_inputs[] = {
COMMON_INPUTS,
{ -1, 0, "" }
};
@@ -171,7 +171,7 @@ ProcNoInputs(blend)
ProcDef(blend)
/* -- MAGIC -- */
-static bNodeSocketTemplate magic_inputs[]= {
+static bNodeSocketTemplate magic_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
{ -1, 0, "" }
@@ -183,7 +183,7 @@ static void magic_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thre
ProcDef(magic)
/* --- MARBLE --- */
-static bNodeSocketTemplate marble_inputs[]= {
+static bNodeSocketTemplate marble_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
@@ -197,7 +197,7 @@ static void marble_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
ProcDef(marble)
/* --- CLOUDS --- */
-static bNodeSocketTemplate clouds_inputs[]= {
+static bNodeSocketTemplate clouds_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ -1, 0, "" }
@@ -209,7 +209,7 @@ static void clouds_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short thr
ProcDef(clouds)
/* --- DISTORTED NOISE --- */
-static bNodeSocketTemplate distnoise_inputs[]= {
+static bNodeSocketTemplate distnoise_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Distortion"), 1.00f, 0.0f, 0.0f, 0.0f, 0.0000f, 10.0f, PROP_UNSIGNED },
@@ -223,7 +223,7 @@ static void distnoise_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short
ProcDef(distnoise)
/* --- WOOD --- */
-static bNodeSocketTemplate wood_inputs[]= {
+static bNodeSocketTemplate wood_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
@@ -237,7 +237,7 @@ static void wood_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short threa
ProcDef(wood)
/* --- MUSGRAVE --- */
-static bNodeSocketTemplate musgrave_inputs[]= {
+static bNodeSocketTemplate musgrave_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("H"), 1.0f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Lacunarity"), 2.0f, 0.0f, 0.0f, 0.0f, 0.0f, 6.0f, PROP_UNSIGNED },
@@ -258,7 +258,7 @@ static void musgrave_map_inputs(Tex *tex, bNodeStack **in, TexParams *p, short t
ProcDef(musgrave)
/* --- NOISE --- */
-static bNodeSocketTemplate noise_inputs[]= {
+static bNodeSocketTemplate noise_inputs[] = {
COMMON_INPUTS,
{ -1, 0, "" }
};
@@ -266,7 +266,7 @@ ProcNoInputs(noise)
ProcDef(noise)
/* --- STUCCI --- */
-static bNodeSocketTemplate stucci_inputs[]= {
+static bNodeSocketTemplate stucci_inputs[] = {
COMMON_INPUTS,
{ SOCK_FLOAT, 1, N_("Size"), 0.25f, 0.0f, 0.0f, 0.0f, 0.0001f, 2.0f, PROP_UNSIGNED },
{ SOCK_FLOAT, 1, N_("Turbulence"), 5.0f, 0.0f, 0.0f, 0.0f, 0.0f, 200.0f, PROP_UNSIGNED },
diff --git a/source/blender/nodes/texture/nodes/node_texture_rotate.c b/source/blender/nodes/texture/nodes/node_texture_rotate.c
index 2f997d36e71..1b1d57044a3 100644
--- a/source/blender/nodes/texture/nodes/node_texture_rotate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_rotate.c
@@ -35,16 +35,16 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_FLOAT, 1, N_("Turns"), 0.0f, 0.0f, 0.0f, 0.0f, -1.0f, 1.0f, PROP_NONE },
{ SOCK_VECTOR, 1, N_("Axis"), 0.0f, 0.0f, 1.0f, 0.0f, -1.0f, 1.0f, PROP_DIRECTION },
- { -1, 0, "" }
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
- { SOCK_RGBA, 0, N_("Color")},
- { -1, 0, "" }
+static bNodeSocketTemplate outputs[] = {
+ { SOCK_RGBA, 0, N_("Color")},
+ { -1, 0, "" }
};
static void rotate(float new_co[3], float a, float ax[3], const float co[3])
diff --git a/source/blender/nodes/texture/nodes/node_texture_scale.c b/source/blender/nodes/texture/nodes/node_texture_scale.c
index 130a21ba84d..56562724fb9 100644
--- a/source/blender/nodes/texture/nodes/node_texture_scale.c
+++ b/source/blender/nodes/texture/nodes/node_texture_scale.c
@@ -33,15 +33,15 @@
#include <math.h>
#include "node_texture_util.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Color"), 0.0f, 0.0f, 0.0f, 1.0f },
{ SOCK_VECTOR, 1, N_("Scale"), 1.0f, 1.0f, 1.0f, 0.0f, -10.0f, 10.0f, PROP_XYZ },
- { -1, 0, "" }
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
- { SOCK_RGBA, 0, N_("Color")},
- { -1, 0, "" }
+static bNodeSocketTemplate outputs[] = {
+ { SOCK_RGBA, 0, N_("Color")},
+ { -1, 0, "" }
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
diff --git a/source/blender/nodes/texture/nodes/node_texture_texture.c b/source/blender/nodes/texture/nodes/node_texture_texture.c
index 4832f19f2c7..cc7367a7632 100644
--- a/source/blender/nodes/texture/nodes/node_texture_texture.c
+++ b/source/blender/nodes/texture/nodes/node_texture_texture.c
@@ -35,13 +35,13 @@
#include "RE_shader_ext.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_RGBA, 1, N_("Color1"), 1.0f, 1.0f, 1.0f, 1.0f },
{ SOCK_RGBA, 1, N_("Color2"), 0.0f, 0.0f, 0.0f, 1.0f },
{ -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
+static bNodeSocketTemplate outputs[] = {
{ SOCK_RGBA, 0, N_("Color") },
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_translate.c b/source/blender/nodes/texture/nodes/node_texture_translate.c
index 85f857ca2be..a95cb00a47d 100644
--- a/source/blender/nodes/texture/nodes/node_texture_translate.c
+++ b/source/blender/nodes/texture/nodes/node_texture_translate.c
@@ -34,15 +34,15 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+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, "" }
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
- { SOCK_RGBA, 0, N_("Color")},
- { -1, 0, "" }
+static bNodeSocketTemplate outputs[] = {
+ { SOCK_RGBA, 0, N_("Color")},
+ { -1, 0, "" }
};
static void colorfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToNor.c b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
index 73dcc72eb40..bbfc1fa616b 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToNor.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToNor.c
@@ -33,15 +33,15 @@
#include "node_texture_util.h"
#include "NOD_texture.h"
-static bNodeSocketTemplate inputs[]= {
+static bNodeSocketTemplate inputs[] = {
{ SOCK_FLOAT, 1, N_("Val"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f, PROP_NONE },
{ SOCK_FLOAT, 1, N_("Nabla"), 0.025f, 0.0f, 0.0f, 0.0f, 0.001f, 0.1f, PROP_UNSIGNED },
- { -1, 0, "" }
+ { -1, 0, "" }
};
-static bNodeSocketTemplate outputs[]= {
- { SOCK_VECTOR, 0, N_("Normal") },
- { -1, 0, "" }
+static bNodeSocketTemplate outputs[] = {
+ { SOCK_VECTOR, 0, N_("Normal") },
+ { -1, 0, "" }
};
static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack **in, short thread)
@@ -49,7 +49,7 @@ static void normalfn(float *out, TexParams *p, bNode *UNUSED(node), bNodeStack *
float new_co[3];
const float *co = p->co;
- float nabla = tex_input_value(in[1], p, thread);
+ float nabla = tex_input_value(in[1], p, thread);
float val;
float nor[3];
diff --git a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
index 515613509f6..78635453fc1 100644
--- a/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
+++ b/source/blender/nodes/texture/nodes/node_texture_valToRgb.c
@@ -34,11 +34,11 @@
#include "NOD_texture.h"
/* **************** VALTORGB ******************** */
-static bNodeSocketTemplate valtorgb_in[]= {
+static bNodeSocketTemplate valtorgb_in[] = {
{ SOCK_FLOAT, 1, N_("Fac"), 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_FACTOR},
{ -1, 0, "" }
};
-static bNodeSocketTemplate valtorgb_out[]= {
+static bNodeSocketTemplate valtorgb_out[] = {
{ SOCK_RGBA, 0, N_("Color")},
{ -1, 0, "" }
};
@@ -77,11 +77,11 @@ void register_node_type_tex_valtorgb(bNodeTreeType *ttype)
}
/* **************** RGBTOBW ******************** */
-static bNodeSocketTemplate rgbtobw_in[]= {
+static bNodeSocketTemplate rgbtobw_in[] = {
{ SOCK_RGBA, 1, N_("Color"), 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
-static bNodeSocketTemplate rgbtobw_out[]= {
+static bNodeSocketTemplate rgbtobw_out[] = {
{ SOCK_FLOAT, 0, N_("Val"), 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};
diff --git a/source/blender/nodes/texture/nodes/node_texture_viewer.c b/source/blender/nodes/texture/nodes/node_texture_viewer.c
index bc31bef59d8..5cb8d8c438c 100644
--- a/source/blender/nodes/texture/nodes/node_texture_viewer.c
+++ b/source/blender/nodes/texture/nodes/node_texture_viewer.c
@@ -66,7 +66,7 @@ void register_node_type_tex_viewer(bNodeTreeType *ttype)
node_type_exec(&ntype, exec);
/* Do not allow muting viewer node. */
- node_type_internal_connect(&ntype, NULL);
+ node_type_internal_links(&ntype, NULL);
nodeRegisterType(ttype, &ntype);
}