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

« back to all changes in this revision

Viewing changes to source/blender/nodes/texture/nodes/node_texture_output.c

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "NOD_texture.h"
35
35
 
36
36
/* **************** COMPOSITE ******************** */
37
 
static bNodeSocketTemplate inputs[]= {
38
 
        { SOCK_RGBA,   1, "Color",  0.0f, 0.0f, 0.0f, 1.0f},
39
 
        { SOCK_VECTOR, 1, "Normal", 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION},
 
37
static bNodeSocketTemplate inputs[] = {
 
38
        { SOCK_RGBA,   1, N_("Color"),  0.0f, 0.0f, 0.0f, 1.0f},
 
39
        { SOCK_VECTOR, 1, N_("Normal"), 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f, PROP_DIRECTION},
40
40
        { -1, 0, ""     }
41
41
};
42
42
 
65
65
                        tex_input_rgba(&target->tr, in[0], &params, cdata->thread);
66
66
                
67
67
                        target->tin = (target->tr + target->tg + target->tb) / 3.0f;
68
 
                        target->talpha = 1;
 
68
                        target->talpha = TRUE;
69
69
                
70
70
                        if (target->nor) {
71
71
                                if (in[1] && in[1]->hasinput)
88
88
        
89
89
        i = node;
90
90
        while (i->prev) i = i->prev;
91
 
        for (; i; i=i->next) {
92
 
                if (
93
 
                        i == node ||
94
 
                        i->type != TEX_NODE_OUTPUT ||
95
 
                        strcmp(name, ((TexNodeOutput*)(i->storage))->name)
96
 
                )
 
91
        for ( ; i; i = i->next) {
 
92
                if (i == node ||
 
93
                    i->type != TEX_NODE_OUTPUT ||
 
94
                    strcmp(name, ((TexNodeOutput*)(i->storage))->name))
 
95
                {
97
96
                        continue;
98
 
                
 
97
                }
 
98
 
99
99
                if (!new_name) {
100
100
                        int len = strlen(name);
101
101
                        if (len >= 4 && sscanf(name + len - 4, ".%03d", &suffix) == 1) {
141
141
        node->custom1 = index;
142
142
}
143
143
 
144
 
static void init(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
 
144
static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
145
145
{
146
146
        TexNodeOutput *tno = MEM_callocN(sizeof(TexNodeOutput), "TEX_output");
147
147
        node->storage= tno;
170
170
        node_type_exec(&ntype, exec);
171
171
        
172
172
        /* Do not allow muting output. */
173
 
        node_type_internal_connect(&ntype, NULL);
 
173
        node_type_internal_links(&ntype, NULL);
174
174
        
175
175
        nodeRegisterType(ttype, &ntype);
176
176
}