diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 15:53:09 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-21 15:53:09 +0400 |
commit | 4bcae5fb076cad3a9ca312a6ba881b5645be76e7 (patch) | |
tree | f49c8016f45cfbdf15859832fd3eda41c3711f20 /source/blender | |
parent | f8db7ccb62cf2dbd26d4b6d9b89d6b3839a2b96a (diff) |
code cleanup: more legacy compo functions ifdef'd
Diffstat (limited to 'source/blender')
4 files changed, 19 insertions, 5 deletions
diff --git a/source/blender/nodes/composite/node_composite_tree.c b/source/blender/nodes/composite/node_composite_tree.c index 17808179836..351b9309d7a 100644 --- a/source/blender/nodes/composite/node_composite_tree.c +++ b/source/blender/nodes/composite/node_composite_tree.c @@ -95,7 +95,9 @@ static void free_node_cache(bNodeTree *UNUSED(ntree), bNode *node) for (sock= node->outputs.first; sock; sock= sock->next) { if (sock->cache) { +#ifdef WITH_COMPOSITOR_LEGACY free_compbuf(sock->cache); +#endif sock->cache= NULL; } } @@ -159,8 +161,9 @@ static void localize(bNodeTree *localtree, bNodeTree *ntree) for (sock= node->outputs.first; sock; sock= sock->next) { sock->new_sock->cache= sock->cache; +#ifdef WITH_COMPOSITOR_LEGACY compbuf_set_node(sock->new_sock->cache, node->new_node); - +#endif sock->cache= NULL; sock->new_sock->new_sock= sock; } @@ -236,7 +239,9 @@ static void local_merge(bNodeTree *localtree, bNodeTree *ntree) for (lsock= lnode->outputs.first; lsock; lsock= lsock->next) { if (ntreeOutputExists(lnode->new_node, lsock->new_sock)) { lsock->new_sock->cache= lsock->cache; +#ifdef WITH_COMPOSITOR_LEGACY compbuf_set_node(lsock->new_sock->cache, lnode->new_node); +#endif lsock->cache= NULL; lsock->new_sock= NULL; } diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c index 1b9ff610e4c..b44454f38d9 100644 --- a/source/blender/nodes/composite/node_composite_util.c +++ b/source/blender/nodes/composite/node_composite_util.c @@ -29,9 +29,10 @@ * \ingroup nodes */ - #include "node_composite_util.h" +#ifdef WITH_COMPOSITOR_LEGACY + #include <limits.h> CompBuf *alloc_compbuf(int sizex, int sizey, int type, int alloc) @@ -1405,3 +1406,4 @@ void IIR_gauss(CompBuf* src, float sigma, int chan, int xy) #undef YVV } +#endif /* WITH_COMPOSITOR_LEGACY */ diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h index 8f772b19d5e..f2719ee0779 100644 --- a/source/blender/nodes/composite/node_composite_util.h +++ b/source/blender/nodes/composite/node_composite_util.h @@ -86,6 +86,9 @@ /* only for forward declarations */ #include "NOD_composite.h" +#define CMP_SCALE_MAX 12000 + +#ifdef WITH_COMPOSITOR_LEGACY /* *************************** operations support *************************** */ @@ -198,9 +201,9 @@ void IIR_gauss(CompBuf* src, float sigma, int chan, int xy); /* transformations */ -#define CMP_SCALE_MAX 12000 - CompBuf* node_composit_transform(CompBuf *cbuf, float x, float y, float angle, float scale, int filter_type); float *node_composit_get_float_buffer(RenderData *rd, ImBuf *ibuf, int *alloc); #endif + +#endif /* WITH_COMPOSITOR_LEGACY */ diff --git a/source/blender/nodes/composite/nodes/node_composite_common.c b/source/blender/nodes/composite/nodes/node_composite_common.c index 3a3f94f05cc..90bed8e1e04 100644 --- a/source/blender/nodes/composite/nodes/node_composite_common.c +++ b/source/blender/nodes/composite/nodes/node_composite_common.c @@ -30,7 +30,6 @@ * \ingroup cmpnodes */ - #include "DNA_node_types.h" #include "BKE_node.h" @@ -184,7 +183,9 @@ static void group_free_internal(bNodeTreeExec *gexec) for (i=0, ns=gexec->stack; i < gexec->stacksize; ++i, ++ns) { if (!ns->external && !ns->is_copy) { if (ns->data) { +#ifdef WITH_COMPOSITOR_LEGACY free_compbuf(ns->data); +#endif ns->data = NULL; } } @@ -231,6 +232,7 @@ void register_node_type_cmp_group(bNodeTreeType *ttype) nodeRegisterType(ttype, &ntype); } +#ifdef WITH_COMPOSITOR_LEGACY /**** FOR LOOP ****/ @@ -377,3 +379,5 @@ void register_node_type_cmp_whileloop(bNodeTreeType *ttype) nodeRegisterType(ttype, &ntype); } #endif + +#endif /* WITH_COMPOSITOR_LEGACY */ |