diff options
Diffstat (limited to 'source/blender/nodes/intern/SHD_nodes/SHD_mapping.c')
-rw-r--r-- | source/blender/nodes/intern/SHD_nodes/SHD_mapping.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c b/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c index f01ed3d7ab8..dce8d1962c7 100644 --- a/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c +++ b/source/blender/nodes/intern/SHD_nodes/SHD_mapping.c @@ -83,22 +83,16 @@ static int gpu_shader_mapping(GPUMaterial *mat, bNode *node, GPUNodeStack *in, G return GPU_stack_link(mat, "mapping", in, out, tmat, tmin, tmax, tdomin, tdomax); } -bNodeType sh_node_mapping= { - /* *next,*prev */ NULL, NULL, - /* type code */ SH_NODE_MAPPING, - /* name */ "Mapping", - /* width+range */ 240, 160, 320, - /* class+opts */ NODE_CLASS_OP_VECTOR, NODE_OPTIONS, - /* input sock */ sh_node_mapping_in, - /* output sock */ sh_node_mapping_out, - /* storage */ "TexMapping", - /* execfunc */ node_shader_exec_mapping, - /* butfunc */ NULL, - /* initfunc */ node_shader_init_mapping, - /* freestoragefunc */ node_free_standard_storage, - /* copystoragefunc */ node_copy_standard_storage, - /* id */ NULL, NULL, NULL, - /* gpufunc */ gpu_shader_mapping +void register_node_type_sh_mapping(ListBase *lb) +{ + static bNodeType ntype; -}; - + node_type_init(&ntype, SH_NODE_MAPPING, "Mapping", NODE_CLASS_OP_VECTOR, NODE_OPTIONS, + sh_node_mapping_in, sh_node_mapping_out); + node_type_size(&ntype, 240, 160, 320); + node_type_storage(&ntype, "TexMapping", node_shader_init_mapping, node_free_standard_storage, node_copy_standard_storage); + node_type_exec(&ntype, node_shader_exec_mapping); + node_type_gpu(&ntype, gpu_shader_mapping); + + nodeRegisterType(lb, &ntype); +} |