diff options
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_scale.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_scale.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c index 9779875b01a..6f030d3d7b3 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_scale.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_scale.c @@ -1,4 +1,4 @@ -/** +/* * $Id$ * * ***** BEGIN GPL LICENSE BLOCK ***** @@ -75,7 +75,7 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b newx= MIN2(newx, CMP_SCALE_MAX); newy= MIN2(newy, CMP_SCALE_MAX); - ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0, 0); + ibuf= IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0); if(ibuf) { ibuf->rect_float= cbuf->rect; IMB_scaleImBuf(ibuf, newx, newy); @@ -109,22 +109,18 @@ static void node_composit_exec_scale(void *data, bNode *node, bNodeStack **in, b } }; -bNodeType cmp_node_scale= { - /* *next,*prev */ NULL, NULL, - /* type code */ CMP_NODE_SCALE, - /* name */ "Scale", - /* width+range */ 140, 100, 320, - /* class+opts */ NODE_CLASS_DISTORT, NODE_OPTIONS, - /* input sock */ cmp_node_scale_in, - /* output sock */ cmp_node_scale_out, - /* storage */ "", - /* execfunc */ node_composit_exec_scale, - /* butfunc */ NULL, - /* initfunc */ NULL, - /* freestoragefunc */ NULL, - /* copystoragefunc */ NULL, - /* id */ NULL -}; +void register_node_type_cmp_scale(ListBase *lb) +{ + static bNodeType ntype; + + node_type_base(&ntype, CMP_NODE_SCALE, "Scale", NODE_CLASS_DISTORT, NODE_OPTIONS, + cmp_node_scale_in, cmp_node_scale_out); + node_type_size(&ntype, 140, 100, 320); + node_type_exec(&ntype, node_composit_exec_scale); + + nodeRegisterType(lb, &ntype); +} + |