diff options
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_stabilize2d.c')
-rw-r--r-- | source/blender/nodes/composite/nodes/node_composite_stabilize2d.c | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c b/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c index 1787e075a14..3b85b4a6b8c 100644 --- a/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c +++ b/source/blender/nodes/composite/nodes/node_composite_stabilize2d.c @@ -45,42 +45,12 @@ static bNodeSocketTemplate cmp_node_stabilize2d_out[] = { { -1, 0, "" } }; -#ifdef WITH_COMPOSITOR_LEGACY - -static void node_composit_exec_stabilize2d(void *data, bNode *node, bNodeStack **in, bNodeStack **out) -{ - if (in[0]->data && node->id) { - RenderData *rd = data; - MovieClip *clip = (MovieClip *)node->id; - CompBuf *cbuf = typecheck_compbuf(in[0]->data, CB_RGBA); - CompBuf *stackbuf; - float loc[2], scale, angle; - int clip_framenr = BKE_movieclip_remap_scene_to_clip_frame(clip, rd->cfra); - - BKE_tracking_stabilization_data_get(&clip->tracking, clip_framenr, cbuf->x, cbuf->y, loc, &scale, &angle); - - stackbuf = node_composit_transform(cbuf, loc[0], loc[1], angle, scale, node->custom1); - - /* pass on output and free */ - out[0]->data = stackbuf; - - if (cbuf != in[0]->data) - free_compbuf(cbuf); - } -} - -#endif /* WITH_COMPOSITOR_LEGACY */ - -void register_node_type_cmp_stabilize2d(bNodeTreeType *ttype) +void register_node_type_cmp_stabilize2d(void) { static bNodeType ntype; - node_type_base(ttype, &ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT, NODE_OPTIONS); + cmp_node_type_base(&ntype, CMP_NODE_STABILIZE2D, "Stabilize 2D", NODE_CLASS_DISTORT, NODE_OPTIONS); node_type_socket_templates(&ntype, cmp_node_stabilize2d_in, cmp_node_stabilize2d_out); - node_type_size(&ntype, 140, 100, 320); -#ifdef WITH_COMPOSITOR_LEGACY - node_type_exec(&ntype, node_composit_exec_stabilize2d); -#endif - nodeRegisterType(ttype, &ntype); + nodeRegisterType(&ntype); } |