~ubuntu-branches/ubuntu/trusty/blender/trusty-proposed

« back to all changes in this revision

Viewing changes to source/blender/nodes/shader/nodes/node_shader_tex_gradient.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2013-08-14 10:43:49 UTC
  • mfrom: (14.2.19 sid)
  • Revision ID: package-import@ubuntu.com-20130814104349-t1d5mtwkphp12dyj
Tags: 2.68a-3
* Upload to unstable
* debian/: python3.3 Depends simplified
  - debian/control: python3.3 Depends dropped
    for blender-data package
  - 0001-blender_thumbnailer.patch refreshed
* debian/control: libavcodec b-dep versioning dropped

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        {       -1, 0, ""       }
41
41
};
42
42
 
43
 
static void node_shader_init_tex_gradient(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
 
43
static void node_shader_init_tex_gradient(bNodeTree *UNUSED(ntree), bNode *node)
44
44
{
45
45
        NodeTexGradient *tex = MEM_callocN(sizeof(NodeTexGradient), "NodeTexGradient");
46
46
        default_tex_mapping(&tex->base.tex_mapping);
50
50
        node->storage = tex;
51
51
}
52
52
 
53
 
static int node_shader_gpu_tex_gradient(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
 
53
static int node_shader_gpu_tex_gradient(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
54
54
{
55
55
        if (!in[0].link)
56
56
                in[0].link = GPU_attribute(CD_ORCO, "");
61
61
}
62
62
 
63
63
/* node type definition */
64
 
void register_node_type_sh_tex_gradient(bNodeTreeType *ttype)
 
64
void register_node_type_sh_tex_gradient(void)
65
65
{
66
66
        static bNodeType ntype;
67
67
 
68
 
        node_type_base(ttype, &ntype, SH_NODE_TEX_GRADIENT, "Gradient Texture", NODE_CLASS_TEXTURE, NODE_OPTIONS);
 
68
        sh_node_type_base(&ntype, SH_NODE_TEX_GRADIENT, "Gradient Texture", NODE_CLASS_TEXTURE, 0);
69
69
        node_type_compatibility(&ntype, NODE_NEW_SHADING);
70
70
        node_type_socket_templates(&ntype, sh_node_tex_gradient_in, sh_node_tex_gradient_out);
71
 
        node_type_size(&ntype, 150, 60, 200);
72
71
        node_type_init(&ntype, node_shader_init_tex_gradient);
73
72
        node_type_storage(&ntype, "NodeTexGradient", node_free_standard_storage, node_copy_standard_storage);
74
 
        node_type_exec(&ntype, NULL);
75
73
        node_type_gpu(&ntype, node_shader_gpu_tex_gradient);
76
74
 
77
 
        nodeRegisterType(ttype, &ntype);
 
75
        nodeRegisterType(&ntype);
78
76
}