Merged the particles-2010 branch with node improvements into trunk.
[blender-staging.git] / source / blender / nodes / composite / nodes / node_composite_vecBlur.c
similarity index 81%
rename from source/blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
rename to source/blender/nodes/composite/nodes/node_composite_vecBlur.c
index c43bfa2435a416babe10954a74f461704cf446d7..e730728d077cbced25478b6abc3d78f54a568bce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id$
+ * $Id: CMP_vecBlur.c 36593 2011-05-10 11:19:26Z lukastoenne $
  *
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * ***** END GPL LICENSE BLOCK *****
  */
 
-/** \file blender/nodes/intern/CMP_nodes/CMP_vecBlur.c
+/** \file blender/nodes/composite/nodes/node_composite_vecBlur.c
  *  \ingroup cmpnodes
  */
 
 
-#include "../CMP_util.h"
+#include "node_composite_util.h"
 
 
 /* **************** VECTOR BLUR ******************** */
-static bNodeSocketType cmp_node_vecblur_in[]= {
-       {       SOCK_RGBA, 1, "Image",                  0.8f, 0.8f, 0.8f, 1.0f, 0.0f, 1.0f},
-       {       SOCK_VALUE, 1, "Z",                     0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
-       {       SOCK_VECTOR, 1, "Speed",                        0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_vecblur_in[]= {
+       {       SOCK_RGBA, 1, "Image",                  0.8f, 0.8f, 0.8f, 1.0f},
+       {       SOCK_FLOAT, 1, "Z",                     0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_NONE},
+       {       SOCK_VECTOR, 1, "Speed",                        0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, PROP_VELOCITY},
        {       -1, 0, ""       }
 };
-static bNodeSocketType cmp_node_vecblur_out[]= {
-       {       SOCK_RGBA, 0, "Image",                  0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 1.0f},
+static bNodeSocketTemplate cmp_node_vecblur_out[]= {
+       {       SOCK_RGBA, 0, "Image"},
        {       -1, 0, ""       }
 };
 
@@ -87,7 +87,7 @@ static void node_composit_exec_vecblur(void *UNUSED(data), bNode *node, bNodeSta
                free_compbuf(img);
 }
 
-static void node_composit_init_vecblur(bNode* node)
+static void node_composit_init_vecblur(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
 {
        NodeBlurData *nbd= MEM_callocN(sizeof(NodeBlurData), "node blur data");
        node->storage= nbd;
@@ -100,8 +100,8 @@ void register_node_type_cmp_vecblur(ListBase *lb)
 {
        static bNodeType ntype;
 
-       node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS,
-               cmp_node_vecblur_in, cmp_node_vecblur_out);
+       node_type_base(&ntype, CMP_NODE_VECBLUR, "Vector Blur", NODE_CLASS_OP_FILTER, NODE_OPTIONS);
+       node_type_socket_templates(&ntype, cmp_node_vecblur_in, cmp_node_vecblur_out);
        node_type_size(&ntype, 120, 80, 200);
        node_type_init(&ntype, node_composit_init_vecblur);
        node_type_storage(&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);