2
* $Id: CMP_value.c,v 1.4 2007/04/04 13:58:10 jesterking Exp $
4
* ***** BEGIN GPL LICENSE BLOCK *****
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.
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.
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.
20
* The Original Code is Copyright (C) 2006 Blender Foundation.
21
* All rights reserved.
23
* The Original Code is: all of this file.
25
* Contributor(s): none yet.
27
* ***** END GPL LICENSE BLOCK *****
30
#include "../CMP_util.h"
32
/* **************** VALUE ******************** */
33
static bNodeSocketType cmp_node_value_out[]= {
34
{ SOCK_VALUE, 0, "Value", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
38
static void node_composit_exec_value(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
40
bNodeSocket *sock= node->outputs.first;
42
out[0]->vec[0]= sock->ns.vec[0];
45
bNodeType cmp_node_value= {
46
/* *next,*prev */ NULL, NULL,
47
/* type code */ CMP_NODE_VALUE,
49
/* width+range */ 80, 40, 120,
50
/* class+opts */ NODE_CLASS_INPUT, NODE_OPTIONS,
51
/* input sock */ NULL,
52
/* output sock */ cmp_node_value_out,
54
/* execfunc */ node_composit_exec_value,
57
/* freestoragefunc */ NULL,
58
/* copystoragefunc */ NULL,