Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/BKE_node.h1
-rw-r--r--source/blender/blenkernel/intern/node.c1
-rw-r--r--source/blender/compositor/CMakeLists.txt5
-rw-r--r--source/blender/compositor/intern/COM_Converter.cpp4
-rw-r--r--source/blender/compositor/nodes/COM_TrackPositionNode.cpp68
-rw-r--r--source/blender/compositor/nodes/COM_TrackPositionNode.h36
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.cpp100
-rw-r--r--source/blender/compositor/operations/COM_TrackPositionOperation.h69
-rw-r--r--source/blender/editors/space_node/drawnode.c39
-rw-r--r--source/blender/makesdna/DNA_node_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c29
-rw-r--r--source/blender/makesrna/intern/rna_nodetree_types.h1
-rw-r--r--source/blender/nodes/CMakeLists.txt1
-rw-r--r--source/blender/nodes/NOD_composite.h2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_trackpos.c65
15 files changed, 426 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index b3f17c06d5c..7bd9f75b2dd 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -660,6 +660,7 @@ void ntreeGPUMaterialNodes(struct bNodeTree *ntree, struct GPUMaterial *mat);
#define CMP_NODE_MASK 268
#define CMP_NODE_KEYINGSCREEN 269
#define CMP_NODE_KEYING 270
+#define CMP_NODE_TRACKPOS 271
#define CMP_NODE_GLARE 301
#define CMP_NODE_TONEMAP 302
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 239072f2bb4..56b1c0a17e8 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1942,6 +1942,7 @@ static void registerCompositNodes(bNodeTreeType *ttype)
register_node_type_cmp_switch(ttype);
register_node_type_cmp_mask(ttype);
+ register_node_type_cmp_trackpos(ttype);
}
static void registerShaderNodes(bNodeTreeType *ttype)
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index 9bad1b55d95..870e379b343 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -338,6 +338,11 @@ set(SRC
operations/COM_KeyingScreenOperation.cpp
operations/COM_KeyingScreenOperation.h
+ nodes/COM_TrackPositionNode.cpp
+ nodes/COM_TrackPositionNode.h
+ operations/COM_TrackPositionOperation.cpp
+ operations/COM_TrackPositionOperation.h
+
nodes/COM_KeyingNode.cpp
nodes/COM_KeyingNode.h
operations/COM_KeyingOperation.cpp
diff --git a/source/blender/compositor/intern/COM_Converter.cpp b/source/blender/compositor/intern/COM_Converter.cpp
index 4ed7ae7ca8a..37d38261ea5 100644
--- a/source/blender/compositor/intern/COM_Converter.cpp
+++ b/source/blender/compositor/intern/COM_Converter.cpp
@@ -110,6 +110,7 @@
#include "COM_TransformNode.h"
#include "COM_TranslateNode.h"
#include "COM_TranslateOperation.h"
+#include "COM_TrackPositionNode.h"
#include "COM_ValueNode.h"
#include "COM_VectorBlurNode.h"
#include "COM_VectorCurveNode.h"
@@ -377,6 +378,9 @@ Node *Converter::convert(bNode *b_node, bool fast)
case CMP_NODE_KEYING:
node = new KeyingNode(b_node);
break;
+ case CMP_NODE_TRACKPOS:
+ node = new TrackPositionNode(b_node);
+ break;
/* not inplemented yet */
default:
node = new MuteNode(b_node);
diff --git a/source/blender/compositor/nodes/COM_TrackPositionNode.cpp b/source/blender/compositor/nodes/COM_TrackPositionNode.cpp
new file mode 100644
index 00000000000..243f63a0149
--- /dev/null
+++ b/source/blender/compositor/nodes/COM_TrackPositionNode.cpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright 2012, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
+ */
+
+#include "COM_TrackPositionNode.h"
+#include "COM_ExecutionSystem.h"
+#include "COM_TrackPositionOperation.h"
+
+extern "C" {
+ #include "DNA_movieclip_types.h"
+}
+
+TrackPositionNode::TrackPositionNode(bNode *editorNode) : Node(editorNode)
+{
+ /* pass */
+}
+
+void TrackPositionNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context)
+{
+ OutputSocket *outputX = this->getOutputSocket(0);
+ OutputSocket *outputY = this->getOutputSocket(1);
+
+ bNode *editorNode = this->getbNode();
+ MovieClip *clip = (MovieClip *) editorNode->id;
+
+ NodeTrackPosData *trackpos_data = (NodeTrackPosData *) editorNode->storage;
+
+ TrackPositionOperation *operationX = new TrackPositionOperation();
+ TrackPositionOperation *operationY = new TrackPositionOperation();
+
+ operationX->setMovieClip(clip);
+ operationX->setTrackingObject(trackpos_data->tracking_object);
+ operationX->setTrackName(trackpos_data->track_name);
+ operationX->setFramenumber(context->getFramenumber());
+ operationX->setAxis(0);
+ operationX->setRelative(editorNode->custom1);
+
+ operationY->setMovieClip(clip);
+ operationY->setTrackingObject(trackpos_data->tracking_object);
+ operationY->setTrackName(trackpos_data->track_name);
+ operationY->setFramenumber(context->getFramenumber());
+ operationY->setAxis(1);
+ operationY->setRelative(editorNode->custom1);
+
+ outputX->relinkConnections(operationX->getOutputSocket());
+ outputY->relinkConnections(operationY->getOutputSocket());
+
+ graph->addOperation(operationX);
+}
diff --git a/source/blender/compositor/nodes/COM_TrackPositionNode.h b/source/blender/compositor/nodes/COM_TrackPositionNode.h
new file mode 100644
index 00000000000..55fd1622437
--- /dev/null
+++ b/source/blender/compositor/nodes/COM_TrackPositionNode.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2012, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
+ */
+
+#include "COM_Node.h"
+#include "DNA_node_types.h"
+
+/**
+ * @brief TrackPositionNode
+ * @ingroup Node
+ */
+class TrackPositionNode : public Node {
+public:
+ TrackPositionNode(bNode *editorNode);
+ void convertToOperations(ExecutionSystem *graph, CompositorContext *context);
+
+};
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.cpp b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
new file mode 100644
index 00000000000..cf516401a3c
--- /dev/null
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.cpp
@@ -0,0 +1,100 @@
+/*
+ * Copyright 2012, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
+ */
+
+#include "COM_TrackPositionOperation.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BLI_listbase.h"
+#include "BLI_math.h"
+#include "BLI_math_color.h"
+
+#include "DNA_scene_types.h"
+
+extern "C" {
+ #include "BKE_movieclip.h"
+ #include "BKE_tracking.h"
+}
+
+TrackPositionOperation::TrackPositionOperation() : NodeOperation()
+{
+ this->addOutputSocket(COM_DT_VALUE);
+ this->movieClip = NULL;
+ this->framenumber = 0;
+ this->trackingObject[0] = 0;
+ this->trackName[0] = 0;
+ this->axis = 0;
+ this->relative = false;
+}
+
+void TrackPositionOperation::executePixel(float *outputValue, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[])
+{
+ MovieClipUser user = {0};
+ MovieTracking *tracking = &movieClip->tracking;
+ MovieTrackingObject *object = BKE_tracking_object_get_named(tracking, this->trackingObject);
+ MovieTrackingTrack *track;
+ MovieTrackingMarker *marker;
+ int width, height;
+
+ outputValue[0] = 0.0f;
+
+ if (!object)
+ return;
+
+ track = BKE_tracking_track_get_named(tracking, object, this->trackName);
+
+ if (!track)
+ return;
+
+ BKE_movieclip_user_set_frame(&user, this->framenumber);
+ BKE_movieclip_get_size(this->movieClip, &user, &width, &height);
+
+ marker = BKE_tracking_marker_get(track, this->framenumber);
+
+ outputValue[0] = marker->pos[this->axis];
+
+ if (this->relative) {
+ int i;
+
+ for (i = 0; i < track->markersnr; i++) {
+ marker = &track->markers[i];
+
+ if ((marker->flag & MARKER_DISABLED) == 0) {
+ outputValue[0] -= marker->pos[this->axis];
+
+ break;
+ }
+ }
+ }
+
+ if (this->axis == 0)
+ outputValue[0] *= width;
+ else
+ outputValue[0] *= height;
+}
+
+void TrackPositionOperation::determineResolution(unsigned int resolution[], unsigned int preferredResolution[])
+{
+ resolution[0] = preferredResolution[0];
+ resolution[1] = preferredResolution[1];
+}
diff --git a/source/blender/compositor/operations/COM_TrackPositionOperation.h b/source/blender/compositor/operations/COM_TrackPositionOperation.h
new file mode 100644
index 00000000000..caf444db0d5
--- /dev/null
+++ b/source/blender/compositor/operations/COM_TrackPositionOperation.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2012, Blender Foundation.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Contributor:
+ * Jeroen Bakker
+ * Monique Dewanchand
+ * Sergey Sharybin
+ */
+
+
+#ifndef _COM_TrackPositionOperation_h
+#define _COM_TrackPositionOperation_h
+
+#include <string.h>
+
+#include "COM_NodeOperation.h"
+
+#include "DNA_scene_types.h"
+#include "DNA_movieclip_types.h"
+
+#include "BLI_listbase.h"
+
+/**
+ * Class with implementation of green screen gradient rasterization
+ */
+class TrackPositionOperation : public NodeOperation {
+protected:
+ MovieClip *movieClip;
+ int framenumber;
+ char trackingObject[64];
+ char trackName[64];
+ int axis;
+ bool relative;
+
+ /**
+ * Determine the output resolution. The resolution is retrieved from the Renderer
+ */
+ void determineResolution(unsigned int resolution[], unsigned int preferredResolution[]);
+
+public:
+ TrackPositionOperation();
+
+ void setMovieClip(MovieClip *clip) {this->movieClip = clip;}
+ void setTrackingObject(char *object) {strncpy(this->trackingObject, object, sizeof(this->trackingObject));}
+ void setTrackName(char *track) {strncpy(this->trackName, track, sizeof(this->trackName));}
+ void setFramenumber(int framenumber) {this->framenumber = framenumber;}
+ void setAxis(int value) {this->axis = value;}
+ void setRelative(bool value) {this->relative = value;}
+
+ void executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer * inputBuffers[]);
+
+ const bool isSetOperation() const { return true; }
+};
+
+#endif
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index e8167926d6e..1281e480458 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -52,6 +52,7 @@
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_node.h"
+#include "BKE_tracking.h"
#include "BLF_api.h"
#include "BLF_translation.h"
@@ -2525,6 +2526,41 @@ static void node_composit_buts_keying(uiLayout *layout, bContext *UNUSED(C), Poi
uiItemR(layout, ptr, "blur_post", 0, NULL, ICON_NONE);
}
+static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRNA *ptr)
+{
+ bNode *node= ptr->data;
+
+ uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
+
+ if (node->id) {
+ MovieClip *clip = (MovieClip *) node->id;
+ MovieTracking *tracking = &clip->tracking;
+ MovieTrackingObject *object;
+ uiLayout *col;
+ PointerRNA tracking_ptr;
+ NodeTrackPosData *data = node->storage;
+
+ RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr);
+
+ col = uiLayoutColumn(layout, 0);
+ uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
+
+ object = BKE_tracking_object_get_named(tracking, data->tracking_object);
+ if (object) {
+ PointerRNA object_ptr;
+
+ RNA_pointer_create(&clip->id, &RNA_MovieTrackingObject, object, &object_ptr);
+
+ uiItemPointerR(col, ptr, "track_name", &object_ptr, "tracks", "", ICON_ANIM_DATA);
+ }
+ else {
+ uiItemR(layout, ptr, "track_name", 0, "", ICON_ANIM_DATA);
+ }
+
+ uiItemR(layout, ptr, "use_relative", 0, NULL, ICON_NONE);
+ }
+}
+
/* only once called */
static void node_composit_set_butfunc(bNodeType *ntype)
{
@@ -2723,6 +2759,9 @@ static void node_composit_set_butfunc(bNodeType *ntype)
case CMP_NODE_KEYING:
ntype->uifunc = node_composit_buts_keying;
break;
+ case CMP_NODE_TRACKPOS:
+ ntype->uifunc = node_composit_buts_trackpos;
+ break;
default:
ntype->uifunc = NULL;
}
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h
index e4b5a264ba3..ea894ff7a0d 100644
--- a/source/blender/makesdna/DNA_node_types.h
+++ b/source/blender/makesdna/DNA_node_types.h
@@ -663,6 +663,11 @@ typedef struct NodeKeyingData {
int blur_pre, blur_post;
} NodeKeyingData;
+typedef struct NodeTrackPosData {
+ char tracking_object[64];
+ char track_name[64];
+} NodeTrackPosData;
+
/* frame node flags */
#define NODE_FRAME_SHRINK 1 /* keep the bounding box minimal */
#define NODE_FRAME_RESIZEABLE 2 /* test flag, if frame can be resized by user */
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 8274b6aef5a..67e0b9fd7c8 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -3648,6 +3648,35 @@ static void def_cmp_keying(StructRNA *srna)
RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
}
+static void def_cmp_trackpos(StructRNA *srna)
+{
+ PropertyRNA *prop;
+
+ prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "id");
+ RNA_def_property_struct_type(prop, "MovieClip");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Movie Clip", "");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "use_relative", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "custom1", 1);
+ RNA_def_property_ui_text(prop, "Relative", "Return relative position to first track's marker");
+ RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+
+ RNA_def_struct_sdna_from(srna, "NodeTrackPosData", "storage");
+
+ prop = RNA_def_property(srna, "tracking_object", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "tracking_object");
+ RNA_def_property_ui_text(prop, "Tracking Object", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+
+ prop = RNA_def_property(srna, "track_name", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "track_name");
+ RNA_def_property_ui_text(prop, "Track", "");
+ RNA_def_property_update(prop, NC_NODE|NA_EDITED, "rna_Node_update");
+}
+
/* -- Texture Nodes --------------------------------------------------------- */
static void def_tex_output(StructRNA *srna)
diff --git a/source/blender/makesrna/intern/rna_nodetree_types.h b/source/blender/makesrna/intern/rna_nodetree_types.h
index 5ebaddda043..a4837a88b17 100644
--- a/source/blender/makesrna/intern/rna_nodetree_types.h
+++ b/source/blender/makesrna/intern/rna_nodetree_types.h
@@ -170,6 +170,7 @@ DefNode( CompositorNode, CMP_NODE_COLORCORRECTION,def_cmp_colorcorrection,"COLOR
DefNode( CompositorNode, CMP_NODE_MASK, def_cmp_mask, "MASK", Mask, "Mask", "" )
DefNode( CompositorNode, CMP_NODE_KEYINGSCREEN, def_cmp_keyingscreen, "KEYINGSCREEN", KeyingScreen, "KeyingScreen", "" )
DefNode( CompositorNode, CMP_NODE_KEYING, def_cmp_keying, "KEYING", Keying, "Keying", "" )
+DefNode( CompositorNode, CMP_NODE_TRACKPOS, def_cmp_trackpos, "TRACKPOS", TrackPos, "Track Position", "" )
DefNode( TextureNode, TEX_NODE_OUTPUT, def_tex_output, "OUTPUT", Output, "Output", "" )
DefNode( TextureNode, TEX_NODE_CHECKER, 0, "CHECKER", Checker, "Checker", "" )
diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt
index ce5ce1d87c1..e8dd4acb63b 100644
--- a/source/blender/nodes/CMakeLists.txt
+++ b/source/blender/nodes/CMakeLists.txt
@@ -103,6 +103,7 @@ set(SRC
composite/nodes/node_composite_stabilize2d.c
composite/nodes/node_composite_texture.c
composite/nodes/node_composite_tonemap.c
+ composite/nodes/node_composite_trackpos.c
composite/nodes/node_composite_transform.c
composite/nodes/node_composite_translate.c
composite/nodes/node_composite_valToRgb.c
diff --git a/source/blender/nodes/NOD_composite.h b/source/blender/nodes/NOD_composite.h
index 33d6327ece1..3b4fa49ea05 100644
--- a/source/blender/nodes/NOD_composite.h
+++ b/source/blender/nodes/NOD_composite.h
@@ -132,4 +132,6 @@ void register_node_type_cmp_bokehimage(struct bNodeTreeType *ttype);
void register_node_type_cmp_bokehblur(struct bNodeTreeType *ttype);
void register_node_type_cmp_switch(struct bNodeTreeType *ttype);
+void register_node_type_cmp_trackpos(struct bNodeTreeType *ttype);
+
#endif
diff --git a/source/blender/nodes/composite/nodes/node_composite_trackpos.c b/source/blender/nodes/composite/nodes/node_composite_trackpos.c
new file mode 100644
index 00000000000..09eb42b4d93
--- /dev/null
+++ b/source/blender/nodes/composite/nodes/node_composite_trackpos.c
@@ -0,0 +1,65 @@
+/*
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2011 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): Blender Foundation,
+ * Sergey Sharybin
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/nodes/composite/nodes/node_composite_movieclip.c
+ * \ingroup cmpnodes
+ */
+
+
+#include "node_composite_util.h"
+
+static bNodeSocketTemplate cmp_node_trackpos_out[] = {
+ { SOCK_FLOAT, 1, N_("X")},
+ { SOCK_FLOAT, 1, N_("Y")},
+ { -1, 0, "" }
+};
+
+static void node_composit_exec_trackpos(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
+{
+}
+
+static void init(bNodeTree *UNUSED(ntree), bNode *node, bNodeTemplate *UNUSED(ntemp))
+{
+ NodeTrackPosData *data = MEM_callocN(sizeof(NodeTrackPosData), "node track position data");
+
+ node->storage = data;
+}
+
+void register_node_type_cmp_trackpos(bNodeTreeType *ttype)
+{
+ static bNodeType ntype;
+
+ node_type_base(ttype, &ntype, CMP_NODE_TRACKPOS, "Track Position", NODE_CLASS_INPUT, NODE_OPTIONS);
+ node_type_socket_templates(&ntype, NULL, cmp_node_trackpos_out);
+ node_type_size(&ntype, 120, 80, 300);
+ node_type_init(&ntype, init);
+ node_type_storage(&ntype, "NodeTrackPosData", node_free_standard_storage, node_copy_standard_storage);
+ node_type_exec(&ntype, node_composit_exec_trackpos);
+
+ nodeRegisterType(ttype, &ntype);
+}