Merged the particles-2010 branch with node improvements into trunk.
[blender-staging.git] / source / blender / nodes / texture / nodes / node_texture_math.c
similarity index 89%
rename from source/blender/nodes/intern/TEX_nodes/TEX_math.c
rename to source/blender/nodes/texture/nodes/node_texture_math.c
index 18468bdd55c17237edd6e9e4f7f201ea141ba3a8..182bc37978fe236d3b9a899f2f949a533a737cb4 100644 (file)
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/nodes/intern/TEX_nodes/TEX_math.c
+/** \file blender/nodes/texture/nodes/node_texture_math.c
  *  \ingroup texnodes
  */
 
 
-#include "../TEX_util.h"
-#include "TEX_node.h"
+#include "node_texture_util.h"
+#include "NOD_texture.h"
 
 
 /* **************** SCALAR MATH ******************** */ 
-static bNodeSocketType inputs[]= { 
-       { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f}, 
-       { SOCK_VALUE, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f}, 
+static bNodeSocketTemplate inputs[]= { 
+       { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, 
+       { SOCK_FLOAT, 1, "Value", 0.5f, 0.5f, 0.5f, 1.0f, -100.0f, 100.0f, PROP_NONE}, 
        { -1, 0, "" } 
 };
 
-static bNodeSocketType outputs[]= { 
-       { SOCK_VALUE, 0, "Value", 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f}, 
+static bNodeSocketTemplate outputs[]= { 
+       { SOCK_FLOAT, 0, "Value"}, 
        { -1, 0, "" } 
 };
 
@@ -189,8 +189,8 @@ void register_node_type_tex_math(ListBase *lb)
 {
        static bNodeType ntype;
        
-       node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS,
-                                  inputs, outputs);
+       node_type_base(&ntype, TEX_NODE_MATH, "Math", NODE_CLASS_CONVERTOR, NODE_OPTIONS);
+       node_type_socket_templates(&ntype, inputs, outputs);
        node_type_size(&ntype, 120, 110, 160);
        node_type_label(&ntype, node_math_label);
        node_type_storage(&ntype, "node_math", NULL, NULL);