Merged the particles-2010 branch with node improvements into trunk.
[blender-staging.git] / source / blender / nodes / composite / nodes / node_composite_texture.c
similarity index 90%
rename from source/blender/nodes/intern/CMP_nodes/CMP_texture.c
rename to source/blender/nodes/composite/nodes/node_composite_texture.c
index 46e71b8b8e50f59e5d6715ee8e208818642a103c..bdeef74c6175cecb4842c331155a70198d62a239 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * $Id: CMP_texture.c 36593 2011-05-10 11:19:26Z lukastoenne $
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/nodes/intern/CMP_nodes/CMP_texture.c
+/** \file blender/nodes/composite/nodes/node_composite_texture.c
  *  \ingroup cmpnodes
  */
 
 
-#include "../CMP_util.h"
+#include "node_composite_util.h"
 
 /* **************** TEXTURE ******************** */
-static bNodeSocketType cmp_node_texture_in[]= {
-       {       SOCK_VECTOR, 1, "Offset",               0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f},
-       {       SOCK_VECTOR, 1, "Scale",                1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f},
+static bNodeSocketTemplate cmp_node_texture_in[]= {
+       {       SOCK_VECTOR, 1, "Offset",               0.0f, 0.0f, 0.0f, 0.0f, -2.0f, 2.0f, PROP_TRANSLATION},
+       {       SOCK_VECTOR, 1, "Scale",                1.0f, 1.0f, 1.0f, 1.0f, -10.0f, 10.0f, PROP_XYZ},
        {       -1, 0, ""       }
 };
-static bNodeSocketType cmp_node_texture_out[]= {
-       {       SOCK_VALUE, 0, "Value",         1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
-       {       SOCK_RGBA , 0, "Color",         1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_texture_out[]= {
+       {       SOCK_FLOAT, 0, "Value"},
+       {       SOCK_RGBA , 0, "Color"},
        {       -1, 0, ""       }
 };
 
@@ -148,8 +148,8 @@ void register_node_type_cmp_texture(ListBase *lb)
 {
        static bNodeType ntype;
 
-       node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW,
-               cmp_node_texture_in, cmp_node_texture_out);
+       node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT, NODE_OPTIONS|NODE_PREVIEW);
+       node_type_socket_templates(&ntype, cmp_node_texture_in, cmp_node_texture_out);
        node_type_size(&ntype, 120, 80, 240);
        node_type_exec(&ntype, node_composit_exec_texture);