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:
authorBastien Montagne <montagne29@wanadoo.fr>2011-11-20 20:13:27 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-11-20 20:13:27 +0400
commitca7d391de8fddb7549c60bba63c8d4671fffb0d2 (patch)
treea25617a0af5ed3a29ae28412e8b625ac8e80e024 /source/blender/nodes/shader/nodes/node_shader_valToRgb.c
parentaf66321f3b7c1b84fada90fa0ab6f6e0774f4163 (diff)
Muting node patch: first part
This allows node type init code to have access to the nodetree type object (needed to allow generic muting node initialization). Huge and boring edits...
Diffstat (limited to 'source/blender/nodes/shader/nodes/node_shader_valToRgb.c')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_valToRgb.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
index 94afd09274a..f0a94928985 100644
--- a/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
+++ b/source/blender/nodes/shader/nodes/node_shader_valToRgb.c
@@ -71,11 +71,11 @@ static int gpu_shader_valtorgb(GPUMaterial *mat, bNode *node, GPUNodeStack *in,
return GPU_stack_link(mat, "valtorgb", in, out, GPU_texture(size, array));
}
-void register_node_type_sh_valtorgb(ListBase *lb)
+void register_node_type_sh_valtorgb(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+ node_type_base(ttype, &ntype, SH_NODE_VALTORGB, "ColorRamp", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
node_type_compatibility(&ntype, NODE_OLD_SHADING);
node_type_socket_templates(&ntype, sh_node_valtorgb_in, sh_node_valtorgb_out);
node_type_size(&ntype, 240, 200, 300);
@@ -84,7 +84,7 @@ void register_node_type_sh_valtorgb(ListBase *lb)
node_type_exec(&ntype, node_shader_exec_valtorgb);
node_type_gpu(&ntype, gpu_shader_valtorgb);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
@@ -112,18 +112,16 @@ static int gpu_shader_rgbtobw(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStac
return GPU_stack_link(mat, "rgbtobw", in, out);
}
-void register_node_type_sh_rgbtobw(ListBase *lb)
+void register_node_type_sh_rgbtobw(bNodeTreeType *ttype)
{
static bNodeType ntype;
- node_type_base(&ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
+ node_type_base(ttype, &ntype, SH_NODE_RGBTOBW, "RGB to BW", NODE_CLASS_CONVERTOR, 0);
node_type_compatibility(&ntype, NODE_OLD_SHADING|NODE_NEW_SHADING);
node_type_socket_templates(&ntype, sh_node_rgbtobw_in, sh_node_rgbtobw_out);
node_type_size(&ntype, 80, 40, 120);
node_type_exec(&ntype, node_shader_exec_rgbtobw);
node_type_gpu(&ntype, gpu_shader_rgbtobw);
- nodeRegisterType(lb, &ntype);
+ nodeRegisterType(ttype, &ntype);
}
-
-