~ubuntu-branches/ubuntu/intrepid/blender/intrepid-updates

« back to all changes in this revision

Viewing changes to source/blender/nodes/intern/SHD_nodes/SHD_value.c

  • Committer: Bazaar Package Importer
  • Author(s): Cyril Brulebois
  • Date: 2008-08-08 02:45:40 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080808024540-kkjp7ekfivzhuw3l
Tags: 2.46+dfsg-4
* Fix python syntax warning in import_dxf.py, which led to nasty output
  in installation/upgrade logs during byte-compilation, using a patch
  provided by the script author (Closes: #492280):
   - debian/patches/45_fix_python_syntax_warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * $Id: SHD_value.c 12931 2007-12-17 18:20:48Z theeth $
 
3
 *
 
4
 * ***** BEGIN GPL LICENSE BLOCK *****
 
5
 *
 
6
 * This program is free software; you can redistribute it and/or
 
7
 * modify it under the terms of the GNU General Public License
 
8
 * as published by the Free Software Foundation; either version 2
 
9
 * of the License, or (at your option) any later version. 
 
10
 *
 
11
 * This program is distributed in the hope that it will be useful,
 
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
 * GNU General Public License for more details.
 
15
 *
 
16
 * You should have received a copy of the GNU General Public License
 
17
 * along with this program; if not, write to the Free Software Foundation,
 
18
 * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
19
 *
 
20
 * The Original Code is Copyright (C) 2005 Blender Foundation.
 
21
 * All rights reserved.
 
22
 *
 
23
 * The Original Code is: all of this file.
 
24
 *
 
25
 * Contributor(s): none yet.
 
26
 *
 
27
 * ***** END GPL LICENSE BLOCK *****
 
28
 */
 
29
 
 
30
#include "../SHD_util.h"
 
31
 
 
32
/* **************** VALUE ******************** */
 
33
static bNodeSocketType sh_node_value_out[]= {
 
34
        {       SOCK_VALUE, 0, "Value",         0.5f, 0.0f, 0.0f, 0.0f, -100.0f, 100.0f},
 
35
        {       -1, 0, ""       }
 
36
};
 
37
 
 
38
static void node_shader_exec_value(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
 
39
{
 
40
        bNodeSocket *sock= node->outputs.first;
 
41
        
 
42
        out[0]->vec[0]= sock->ns.vec[0];
 
43
}
 
44
 
 
45
 
 
46
 
 
47
bNodeType sh_node_value= {
 
48
        /* *next,*prev */       NULL, NULL,
 
49
        /* type code   */       SH_NODE_VALUE,
 
50
        /* name        */       "Value",
 
51
        /* width+range */       80, 50, 120,
 
52
        /* class+opts  */       NODE_CLASS_INPUT, NODE_OPTIONS,
 
53
        /* input sock  */       NULL,
 
54
        /* output sock */       sh_node_value_out,
 
55
        /* storage     */       "", 
 
56
        /* execfunc    */       node_shader_exec_value,
 
57
        /* butfunc     */       NULL,
 
58
        /* initfunc    */       NULL,
 
59
        /* freestoragefunc    */        NULL,
 
60
        /* copystoragefunc    */        NULL,
 
61
        /* id          */       NULL
 
62
        
 
63
};
 
64