code cleanup: some legacy compo nodes were not ifdef'd
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user