Merged the particles-2010 branch with node improvements into trunk.
[blender-staging.git] / source / blender / nodes / composite / nodes / node_composite_mixrgb.c
similarity index 81%
rename from source/blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
rename to source/blender/nodes/composite/nodes/node_composite_mixrgb.c
index d2454b37c29f9a2ff1df75369c3532e172294886..a5dcfcc44dade0340f5aa8b58576c32ac41a2a9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * $Id: CMP_mixrgb.c 36593 2011-05-10 11:19:26Z lukastoenne $
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/nodes/intern/CMP_nodes/CMP_mixrgb.c
+/** \file blender/nodes/composite/nodes/node_composite_mixrgb.c
  *  \ingroup cmpnodes
  */
 
-#include "../CMP_util.h"
+#include "node_composite_util.h"
 
 /* **************** MIX RGB ******************** */
-static bNodeSocketType cmp_node_mix_rgb_in[]= {
-       {       SOCK_VALUE, 1, "Fac",                   0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f},
-       {       SOCK_RGBA, 1, "Image",                  0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
-       {       SOCK_RGBA, 1, "Image",                  0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_mix_rgb_in[]= {
+       {       SOCK_FLOAT, 1, "Fac",                   0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR},
+       {       SOCK_RGBA, 1, "Image",                  0.8f, 0.8f, 0.8f, 1.0f},
+       {       SOCK_RGBA, 1, "Image",                  0.8f, 0.8f, 0.8f, 1.0f},
        {       -1, 0, ""       }
 };
-static bNodeSocketType cmp_node_mix_rgb_out[]= {
-       {       SOCK_RGBA, 0, "Image",                  0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_mix_rgb_out[]= {
+       {       SOCK_RGBA, 0, "Image"},
        {       -1, 0, ""       }
 };
 
@@ -88,8 +88,8 @@ void register_node_type_cmp_mix_rgb(ListBase *lb)
 {
        static bNodeType ntype;
 
-       node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS,
-               cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
+       node_type_base(&ntype, CMP_NODE_MIX_RGB, "Mix", NODE_CLASS_OP_COLOR, NODE_PREVIEW|NODE_OPTIONS);
+       node_type_socket_templates(&ntype, cmp_node_mix_rgb_in, cmp_node_mix_rgb_out);
        node_type_size(&ntype, 110, 60, 120);
        node_type_label(&ntype, node_blend_label);
        node_type_exec(&ntype, node_composit_exec_mix_rgb);