code cleanup: some legacy compo nodes were not ifdef'd
authorCampbell Barton <ideasman42@gmail.com>
Tue, 21 Aug 2012 08:58:47 +0000 (08:58 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 21 Aug 2012 08:58:47 +0000 (08:58 +0000)
14 files changed:
source/blender/editors/interface/interface_templates.c
source/blender/nodes/composite/nodes/node_composite_alphaOver.c
source/blender/nodes/composite/nodes/node_composite_bilateralblur.c
source/blender/nodes/composite/nodes/node_composite_blur.c
source/blender/nodes/composite/nodes/node_composite_brightness.c
source/blender/nodes/composite/nodes/node_composite_colorSpill.c
source/blender/nodes/composite/nodes/node_composite_composite.c
source/blender/nodes/composite/nodes/node_composite_keying.c
source/blender/nodes/composite/nodes/node_composite_keyingscreen.c
source/blender/nodes/composite/nodes/node_composite_mask.c
source/blender/nodes/composite/nodes/node_composite_moviedistortion.c
source/blender/nodes/composite/nodes/node_composite_outputFile.c
source/blender/nodes/composite/nodes/node_composite_splitViewer.c
source/blender/nodes/composite/nodes/node_composite_viewer.c

index 54202caa16ca006e4e910c05aaf6416c683790f9..71c019ae29e4b1c0385b5ba190b8026ab1fc2e15 100644 (file)
@@ -1757,7 +1757,7 @@ static void curvemap_buttons_reset(bContext *C, void *cb_v, void *cumap_v)
        cumap->white[0] = cumap->white[1] = cumap->white[2] = 1.0f;
        curvemapping_set_black_white(cumap, NULL, NULL);
        
-       curvemapping_changed(cumap, 0);
+       curvemapping_changed(cumap, FALSE);
 
        rna_update_cb(C, cb_v, NULL);
 }
index 92702ef29407bf61fb5c56f1b851dc6c7c435d9e..6fbff76e2dda4c03ad25c16cc727840a6861f7e0 100644 (file)
@@ -157,5 +157,6 @@ void register_node_type_cmp_alphaover(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_alphaover);
 #endif
+
        nodeRegisterType(ttype, &ntype);
 }
index 0562ff5a8a96bafbe1ca7af0d9dc1bb1fbc08fb5..e05ef1ea5a5ab4e816481d73b94397e1f1312af8 100644 (file)
@@ -278,5 +278,6 @@ void register_node_type_cmp_bilateralblur(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_bilateralblur);
 #endif
+
        nodeRegisterType(ttype, &ntype);
 }
index 551164b8d2622d2cc32af617e6018e9656d64574..b9b2406631bfe7958ac2500348edbef05ae1c241 100644 (file)
@@ -741,5 +741,6 @@ void register_node_type_cmp_blur(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_blur);
 #endif
+
        nodeRegisterType(ttype, &ntype);
 }
index f92fdd1ab9aa7c603ba89ad89995d7b2e9ea45de..2b8a394d6f28e481d4b3e7d298dd675590c5ba08 100644 (file)
@@ -106,6 +106,6 @@ void register_node_type_cmp_brightcontrast(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_brightcontrast);
 #endif
-       
+
        nodeRegisterType(ttype, &ntype);
 }
index b8ad5bdfc7ef179b579967dd38b0e55043fa71bc..9456ef8e9d9393d4de1d5c199ab949061373aec2 100644 (file)
@@ -342,6 +342,6 @@ void register_node_type_cmp_color_spill(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_color_spill);
 #endif
-       
+
        nodeRegisterType(ttype, &ntype);
 }
index 74f2e5c5b46cfad8354970ad9b46b3d53759b5b1..dadc863873da250d8b2731a1da1a27ef8eb3c68f 100644 (file)
@@ -108,6 +108,7 @@ void register_node_type_cmp_composite(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_composite);
 #endif
+
        /* Do not allow muting for this node. */
        node_type_internal_connect(&ntype, NULL);
 
index f3074bc8ed37d7d46699cc895f5d31df040db871..b9721910fd15a2bfc9598e99ccf37c403d9a7c11 100644 (file)
@@ -60,9 +60,12 @@ static bNodeSocketTemplate cmp_node_keying_out[] = {
        {       -1, 0, ""       }
 };
 
-static void exec(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
+#ifdef WITH_COMPOSITOR_LEGACY
+static void node_composit_exec_keying(void *UNUSED(data), bNode *UNUSED(node), bNodeStack **UNUSED(in), bNodeStack **UNUSED(out))
 {
+       /* pass */
 }
+#endif  /* WITH_COMPOSITOR_LEGACY */
 
 static void node_composit_init_keying(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
 {
@@ -91,7 +94,9 @@ void register_node_type_cmp_keying(bNodeTreeType *ttype)
        node_type_size(&ntype, 140, 100, 320);
        node_type_init(&ntype, node_composit_init_keying);
        node_type_storage(&ntype, "NodeKeyingData", node_free_standard_storage, node_copy_standard_storage);
-       node_type_exec(&ntype, exec);
+#ifdef WITH_COMPOSITOR_LEGACY
+       node_type_exec(&ntype, node_composit_exec_keying);
+#endif
 
        nodeRegisterType(ttype, &ntype);
 }
index 73423e2bdd315c07f2149bbf4bdd3c95d0159131..3fc4781fdc31e2974043953be83d951f62e19f33 100644 (file)
@@ -50,6 +50,7 @@ static bNodeSocketTemplate cmp_node_keyingscreen_out[] = {
        {       -1, 0, ""       }
 };
 
+#ifdef WITH_COMPOSITOR_LEGACY
 
 static void compute_gradient_screen(RenderData *rd, NodeKeyingScreenData *keyingscreen_data, MovieClip *clip, CompBuf *screenbuf)
 {
@@ -157,7 +158,7 @@ static void compute_gradient_screen(RenderData *rd, NodeKeyingScreenData *keying
        BLI_freelistN(&edges);
 }
 
-static void exec(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
+static void node_composit_exec_keyingscreen(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
 {
        NodeKeyingScreenData *keyingscreen_data = node->storage;
        RenderData *rd = data;
@@ -178,6 +179,8 @@ static void exec(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **
        out[0]->data = screenbuf;
 }
 
+#endif  /* WITH_COMPOSITOR_LEGACY */
+
 static void node_composit_init_keyingscreen(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
 {
        NodeKeyingScreenData *data;
@@ -196,7 +199,9 @@ void register_node_type_cmp_keyingscreen(bNodeTreeType *ttype)
        node_type_size(&ntype, 140, 100, 320);
        node_type_init(&ntype, node_composit_init_keyingscreen);
        node_type_storage(&ntype, "NodeKeyingScreenData", node_free_standard_storage, node_copy_standard_storage);
-       node_type_exec(&ntype, exec);
+#ifdef WITH_COMPOSITOR_LEGACY
+       node_type_exec(&ntype, node_composit_exec_keyingscreen);
+#endif
 
        nodeRegisterType(ttype, &ntype);
 }
index f4cbd1b7f6fea0d6b6584d4bb39095313328f7dc..5c5bc2a97781bcfd6ab2d704e023bc805945cda1 100644 (file)
@@ -45,7 +45,8 @@ static bNodeSocketTemplate cmp_node_mask_out[] = {
        {   -1, 0, ""   }
 };
 
-static void exec(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
+#ifdef WITH_COMPOSITOR_LEGACY
+static void node_composit_exec_mask(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **out)
 {
        if (node->id) {
                Mask *mask = (Mask *)node->id;
@@ -84,6 +85,7 @@ static void exec(void *data, bNode *node, bNodeStack **UNUSED(in), bNodeStack **
                out[0]->data = stackbuf;
        }
 }
+#endif  /* WITH_COMPOSITOR_LEGACY */
 
 static void node_composit_init_mask(bNodeTree *UNUSED(ntree), bNode* node, bNodeTemplate *UNUSED(ntemp))
 {
@@ -103,7 +105,9 @@ void register_node_type_cmp_mask(bNodeTreeType *ttype)
        node_type_socket_templates(&ntype, NULL, cmp_node_mask_out);
        node_type_size(&ntype, 140, 100, 320);
        node_type_init(&ntype, node_composit_init_mask);
-       node_type_exec(&ntype, exec);
+#ifdef WITH_COMPOSITOR_LEGACY
+       node_type_exec(&ntype, node_composit_exec_mask);
+#endif
 
        node_type_storage(&ntype, "NodeMask", node_free_standard_storage, node_copy_standard_storage);
 
index 65fe3b251d064038cb1cb482c1578b4d30bd36b7..9f4cd467c9478baa7bedfccb7b76984e2ce1a1e3 100644 (file)
@@ -47,7 +47,8 @@ static bNodeSocketTemplate cmp_node_moviedistortion_out[] = {
        {       -1, 0, ""       }
 };
 
-static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
+#ifdef WITH_COMPOSITOR_LEGACY
+static void node_composit_exec_moviedistortion(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
 {
        if (in[0]->data) {
                if (node->id) {
@@ -104,6 +105,7 @@ static void exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out)
                }
        }
 }
+#endif  /* WITH_COMPOSITOR_LEGACY */
 
 static const char *label(bNode *node)
 {
@@ -135,7 +137,10 @@ void register_node_type_cmp_moviedistortion(bNodeTreeType *ttype)
        node_type_socket_templates(&ntype, cmp_node_moviedistortion_in, cmp_node_moviedistortion_out);
        node_type_size(&ntype, 140, 100, 320);
        node_type_label(&ntype, label);
-       node_type_exec(&ntype, exec);
+#ifdef WITH_COMPOSITOR_LEGACY
+       node_type_exec(&ntype, node_composit_exec_moviedistortion);
+#endif
+
        node_type_storage(&ntype, NULL, storage_free, storage_copy);
 
        nodeRegisterType(ttype, &ntype);
index 8a0d7200079363a4bd92f23e93d33ade7f82853e..aa92e713adfb047eb71de5bffd290f11ad60ffd1 100644 (file)
@@ -227,6 +227,8 @@ static void update_output_file(bNodeTree *UNUSED(ntree), bNode *node)
        }
 }
 
+#ifdef WITH_COMPOSITOR_LEGACY
+
 /* write input data into individual files */
 static void exec_output_file_singlelayer(RenderData *rd, bNode *node, bNodeStack **in)
 {
@@ -386,7 +388,7 @@ static void exec_output_file_multilayer(RenderData *rd, bNode *node, bNodeStack
        IMB_exr_close(exrhandle);
 }
 
-static void exec_output_file(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out))
+static void node_composit_exec_outputfile(void *data, bNode *node, bNodeStack **in, bNodeStack **UNUSED(out))
 {
        RenderData *rd= data;
        NodeImageMultiFile *nimf= node->storage;
@@ -403,6 +405,7 @@ static void exec_output_file(void *data, bNode *node, bNodeStack **in, bNodeStac
        else
                exec_output_file_singlelayer(rd, node, in);
 }
+#endif  /* WITH_COMPOSITOR_LEGACY */
 
 void register_node_type_cmp_output_file(bNodeTreeType *ttype)
 {
@@ -414,7 +417,9 @@ void register_node_type_cmp_output_file(bNodeTreeType *ttype)
        node_type_init(&ntype, init_output_file);
        node_type_storage(&ntype, "NodeImageMultiFile", free_output_file, copy_output_file);
        node_type_update(&ntype, update_output_file, NULL);
-       node_type_exec(&ntype, exec_output_file);
+#ifdef WITH_COMPOSITOR_LEGACY
+       node_type_exec(&ntype, node_composit_exec_outputfile);
+#endif
 
        nodeRegisterType(ttype, &ntype);
 }
index af115c25c140d9a1662a5edb6d006eed442aebb6..420718f8dd9b6cfdd66b3562713a99ce06349b09 100644 (file)
@@ -165,6 +165,7 @@ void register_node_type_cmp_splitviewer(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_splitviewer);
 #endif
+
        /* Do not allow muting for this node. */
        node_type_internal_connect(&ntype, NULL);
 
index 0bdab75fc5f44f92b5cb4c6b802cbf1b07659561..6321b1def4d29d7085efea2325cd2446cead4157 100644 (file)
@@ -148,6 +148,7 @@ void register_node_type_cmp_viewer(bNodeTreeType *ttype)
 #ifdef WITH_COMPOSITOR_LEGACY
        node_type_exec(&ntype, node_composit_exec_viewer);
 #endif
+
        node_type_internal_connect(&ntype, NULL);
 
        nodeRegisterType(ttype, &ntype);