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/intern/SHD_nodes/SHD_texture.c')
-rw-r--r--source/blender/nodes/intern/SHD_nodes/SHD_texture.c34
1 files changed, 15 insertions, 19 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c b/source/blender/nodes/intern/SHD_nodes/SHD_texture.c
index b2fb3b2261c..56c8cd062a3 100644
--- a/source/blender/nodes/intern/SHD_nodes/SHD_texture.c
+++ b/source/blender/nodes/intern/SHD_nodes/SHD_texture.c
@@ -1,4 +1,4 @@
-/**
+/*
* $Id$
*
* ***** BEGIN GPL LICENSE BLOCK *****
@@ -58,6 +58,7 @@ static void node_shader_exec_texture(void *data, bNode *node, bNodeStack **in, b
/* we should find out if a normal as output is needed, for now we do all */
texres.nor= nor;
+ texres.tr= texres.tg= texres.tb= 0.0f;
if(in[0]->hasinput) {
nodestack_get_vec(vec, SOCK_VECTOR, in[0]);
@@ -127,22 +128,17 @@ static int gpu_shader_texture(GPUMaterial *mat, bNode *node, GPUNodeStack *in, G
return 0;
}
-bNodeType sh_node_texture= {
- /* *next,*prev */ NULL, NULL,
- /* type code */ SH_NODE_TEXTURE,
- /* name */ "Texture",
- /* width+range */ 120, 80, 240,
- /* class+opts */ NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
- /* input sock */ sh_node_texture_in,
- /* output sock */ sh_node_texture_out,
- /* storage */ "",
- /* execfunc */ node_shader_exec_texture,
- /* butfunc */ NULL,
- /* initfunc */ NULL,
- /* freestoragefunc */ NULL,
- /* copystoragefunc */ NULL,
- /* id */ NULL, NULL, NULL,
- /* gpufunc */ gpu_shader_texture
-
-};
+void register_node_type_sh_texture(ListBase *lb)
+{
+ static bNodeType ntype;
+
+ node_type_base(&ntype, SH_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
+ sh_node_texture_in, sh_node_texture_out);
+ node_type_size(&ntype, 120, 80, 240);
+ node_type_exec(&ntype, node_shader_exec_texture);
+ node_type_gpu(&ntype, gpu_shader_texture);
+
+ nodeRegisterType(lb, &ntype);
+}
+