Realtime Compositor: Add stub unsupported nodes

This patch adds a stub implementation for all unsupported nodes. The
inputs are passed through to the outputs where it make sense, while
other outputs will be allocated a single zero value.

This seems to be preferred by users as opposed to stopping execution and
displaying an error message.

Differential Revision: https://developer.blender.org/D15464

Reviewed By: Clement Foucault
This commit is contained in:
Omar Emara 2022-08-10 10:36:57 +02:00
parent 40c45985a9
commit fad112be1c
38 changed files with 773 additions and 20 deletions

View File

@ -62,22 +62,6 @@ bool Evaluator::validate_node_tree()
return false;
}
/* Find any of the unsupported nodes in the node tree. We only track one of them because we
* display a message for only one at a time to avoid long messages. */
DNode unsupported_node;
derived_node_tree_->foreach_node([&](DNode node) {
if (!is_node_supported(node)) {
unsupported_node = node;
}
});
/* unsupported_node is null if no unsupported node was found. */
if (unsupported_node) {
std::string message = "Compositor node tree has an unsupported node: ";
context_.set_info_message(message + unsupported_node->idname());
return false;
}
return true;
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Anti-Aliasing (SMAA 1x) ******************** */
@ -42,6 +44,23 @@ static void node_composit_buts_antialiasing(uiLayout *layout, bContext *UNUSED(C
uiItemR(col, ptr, "corner_rounding", 0, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class AntiAliasingOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new AntiAliasingOperation(context, node);
}
} // namespace blender::nodes::node_composite_antialiasing_cc
void register_node_type_cmp_antialiasing()
@ -58,6 +77,7 @@ void register_node_type_cmp_antialiasing()
node_type_init(&ntype, file_ns::node_composit_init_antialiasing);
node_type_storage(
&ntype, "NodeAntiAliasingData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** BILATERALBLUR ******************** */
@ -42,6 +44,23 @@ static void node_composit_buts_bilateralblur(uiLayout *layout,
uiItemR(col, ptr, "sigma_space", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class BilateralBlurOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new BilateralBlurOperation(context, node);
}
} // namespace blender::nodes::node_composite_bilateralblur_cc
void register_node_type_cmp_bilateralblur()
@ -56,6 +75,7 @@ void register_node_type_cmp_bilateralblur()
node_type_init(&ntype, file_ns::node_composit_init_bilateralblur);
node_type_storage(
&ntype, "NodeBilateralBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** BLUR ******************** */
@ -71,6 +73,23 @@ static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), Point
uiItemR(col, ptr, "use_extended_bounds", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class BlurOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new BlurOperation(context, node);
}
} // namespace blender::nodes::node_composite_blur_cc
void register_node_type_cmp_blur()
@ -86,6 +105,7 @@ void register_node_type_cmp_blur()
node_type_init(&ntype, file_ns::node_composit_init_blur);
node_type_storage(
&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** BLUR ******************** */
@ -37,6 +39,23 @@ static void node_composit_buts_bokehblur(uiLayout *layout, bContext *UNUSED(C),
uiItemR(layout, ptr, "use_extended_bounds", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class BokehBlurOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new BokehBlurOperation(context, node);
}
} // namespace blender::nodes::node_composite_bokehblur_cc
void register_node_type_cmp_bokehblur()
@ -49,6 +68,7 @@ void register_node_type_cmp_bokehblur()
ntype.declare = file_ns::cmp_node_bokehblur_declare;
ntype.draw_buttons = file_ns::node_composit_buts_bokehblur;
node_type_init(&ntype, file_ns::node_composit_init_bokehblur);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Bokeh image Tools ******************** */
@ -45,6 +47,23 @@ static void node_composit_buts_bokehimage(uiLayout *layout, bContext *UNUSED(C),
uiItemR(layout, ptr, "shift", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class BokehImageOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_result("Image").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new BokehImageOperation(context, node);
}
} // namespace blender::nodes::node_composite_bokehimage_cc
void register_node_type_cmp_bokehimage()
@ -60,6 +79,7 @@ void register_node_type_cmp_bokehimage()
node_type_init(&ntype, file_ns::node_composit_init_bokehimage);
node_type_storage(
&ntype, "NodeBokehImage", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -14,6 +14,8 @@
#include "IMB_colormanagement.h"
#include "COM_node_operation.hh"
namespace blender::nodes::node_composite_convert_color_space_cc {
static void CMP_NODE_CONVERT_COLOR_SPACE_declare(NodeDeclarationBuilder &b)
@ -47,6 +49,23 @@ static void node_composit_buts_convert_colorspace(uiLayout *layout,
uiItemR(layout, ptr, "to_color_space", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class ConvertColorSpaceOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new ConvertColorSpaceOperation(context, node);
}
} // namespace blender::nodes::node_composite_convert_color_space_cc
void register_node_type_cmp_convert_color_space(void)
@ -62,6 +81,7 @@ void register_node_type_cmp_convert_color_space(void)
node_type_init(&ntype, file_ns::node_composit_init_convert_colorspace);
node_type_storage(
&ntype, "NodeConvertColorSpace", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -5,6 +5,8 @@
* \ingroup cmpnodes
*/
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_cornerpin_cc {
@ -32,6 +34,24 @@ static void cmp_node_cornerpin_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>(N_("Plane"));
}
using namespace blender::realtime_compositor;
class CornerPinOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
get_result("Plane").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new CornerPinOperation(context, node);
}
} // namespace blender::nodes::node_composite_cornerpin_cc
void register_node_type_cmp_cornerpin()
@ -42,6 +62,7 @@ void register_node_type_cmp_cornerpin()
cmp_node_type_base(&ntype, CMP_NODE_CORNERPIN, "Corner Pin", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_cornerpin_declare;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -26,6 +26,8 @@
#include "RE_pipeline.h"
#include "COM_node_operation.hh"
#include <optional>
/* -------------------------------------------------------------------- */
@ -299,6 +301,25 @@ static bool node_poll_cryptomatte(bNodeType *UNUSED(ntype),
return false;
}
using namespace blender::realtime_compositor;
class CryptoMatteOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
get_result("Matte").allocate_invalid();
get_result("Pick").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new CryptoMatteOperation(context, node);
}
} // namespace blender::nodes::node_composite_cryptomatte_cc
void register_node_type_cmp_cryptomatte()
@ -316,6 +337,8 @@ void register_node_type_cmp_cryptomatte()
ntype.poll = file_ns::node_poll_cryptomatte;
node_type_storage(
&ntype, "NodeCryptomatte", file_ns::node_free_cryptomatte, file_ns::node_copy_cryptomatte);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}
@ -350,7 +373,7 @@ int ntreeCompositCryptomatteRemoveSocket(bNodeTree *ntree, bNode *node)
return 1;
}
namespace blender::nodes::node_composite_cryptomatte_cc {
namespace blender::nodes::node_composite_legacy_cryptomatte_cc {
static void node_init_cryptomatte_legacy(bNodeTree *ntree, bNode *node)
{
@ -365,21 +388,41 @@ static void node_init_cryptomatte_legacy(bNodeTree *ntree, bNode *node)
ntreeCompositCryptomatteAddSocket(ntree, node);
}
} // namespace blender::nodes::node_composite_cryptomatte_cc
using namespace blender::realtime_compositor;
class CryptoMatteOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("image").pass_through(get_result("Image"));
get_result("Matte").allocate_invalid();
get_result("Pick").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new CryptoMatteOperation(context, node);
}
} // namespace blender::nodes::node_composite_legacy_cryptomatte_cc
void register_node_type_cmp_cryptomatte_legacy()
{
namespace legacy_file_ns = blender::nodes::node_composite_cryptomatte_cc;
namespace legacy_file_ns = blender::nodes::node_composite_legacy_cryptomatte_cc;
namespace file_ns = blender::nodes::node_composite_cryptomatte_cc;
static bNodeType ntype;
cmp_node_type_base(&ntype, CMP_NODE_CRYPTOMATTE_LEGACY, "Cryptomatte", NODE_CLASS_MATTE);
node_type_socket_templates(&ntype, nullptr, file_ns::cmp_node_cryptomatte_out);
node_type_init(&ntype, file_ns::node_init_cryptomatte_legacy);
node_type_init(&ntype, legacy_file_ns::node_init_cryptomatte_legacy);
node_type_storage(
&ntype, "NodeCryptomatte", file_ns::node_free_cryptomatte, file_ns::node_copy_cryptomatte);
ntype.gather_link_search_ops = nullptr;
ntype.get_compositor_operation = legacy_file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -12,6 +12,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* ************ Defocus Node ****************** */
@ -81,6 +83,23 @@ static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA
uiItemR(sub, ptr, "z_scale", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class DefocusOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DefocusOperation(context, node);
}
} // namespace blender::nodes::node_composite_defocus_cc
void register_node_type_cmp_defocus()
@ -94,6 +113,7 @@ void register_node_type_cmp_defocus()
ntype.draw_buttons = file_ns::node_composit_buts_defocus;
node_type_init(&ntype, file_ns::node_composit_init_defocus);
node_type_storage(&ntype, "NodeDefocus", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_denoise_cc {
@ -52,6 +54,23 @@ static void node_composit_buts_denoise(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "use_hdr", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class DenoiseOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DenoiseOperation(context, node);
}
} // namespace blender::nodes::node_composite_denoise_cc
void register_node_type_cmp_denoise()
@ -65,6 +84,7 @@ void register_node_type_cmp_denoise()
ntype.draw_buttons = file_ns::node_composit_buts_denoise;
node_type_init(&ntype, file_ns::node_composit_init_denonise);
node_type_storage(&ntype, "NodeDenoise", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** FILTER ******************** */
@ -36,6 +38,23 @@ static void node_composit_buts_despeckle(uiLayout *layout, bContext *UNUSED(C),
uiItemR(col, ptr, "threshold_neighbor", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class DespeckleOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DespeckleOperation(context, node);
}
} // namespace blender::nodes::node_composite_despeckle_cc
void register_node_type_cmp_despeckle()
@ -49,6 +68,7 @@ void register_node_type_cmp_despeckle()
ntype.draw_buttons = file_ns::node_composit_buts_despeckle;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, file_ns::node_composit_init_despeckle);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Dilate/Erode ******************** */
@ -43,6 +45,23 @@ static void node_composit_buts_dilateerode(uiLayout *layout, bContext *UNUSED(C)
}
}
using namespace blender::realtime_compositor;
class DilateErodeOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Mask").pass_through(get_result("Mask"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DilateErodeOperation(context, node);
}
} // namespace blender::nodes::node_composite_dilate_cc
void register_node_type_cmp_dilateerode()
@ -57,6 +76,7 @@ void register_node_type_cmp_dilateerode()
node_type_init(&ntype, file_ns::node_composit_init_dilateerode);
node_type_storage(
&ntype, "NodeDilateErode", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_directionalblur_cc {
@ -51,6 +53,23 @@ static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), Poin
uiItemR(layout, ptr, "zoom", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class DirectionalBlurOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DirectionalBlurOperation(context, node);
}
} // namespace blender::nodes::node_composite_directionalblur_cc
void register_node_type_cmp_dblur()
@ -65,6 +84,7 @@ void register_node_type_cmp_dblur()
node_type_init(&ntype, file_ns::node_composit_init_dblur);
node_type_storage(
&ntype, "NodeDBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -24,6 +24,23 @@ static void cmp_node_displace_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>(N_("Image"));
}
using namespace blender::realtime_compositor;
class DisplaceOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DisplaceOperation(context, node);
}
} // namespace blender::nodes::node_composite_displace_cc
void register_node_type_cmp_displace()
@ -34,6 +51,7 @@ void register_node_type_cmp_displace()
cmp_node_type_base(&ntype, CMP_NODE_DISPLACE, "Displace", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_displace_declare;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Double Edge Mask ******************** */
@ -35,6 +37,23 @@ static void node_composit_buts_double_edge_mask(uiLayout *layout,
uiItemR(col, ptr, "edge_mode", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
class DoubleEdgeMaskOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Inner Mask").pass_through(get_result("Mask"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new DoubleEdgeMaskOperation(context, node);
}
} // namespace blender::nodes::node_composite_double_edge_mask_cc
void register_node_type_cmp_doubleedgemask()
@ -46,6 +65,7 @@ void register_node_type_cmp_doubleedgemask()
cmp_node_type_base(&ntype, CMP_NODE_DOUBLEEDGEMASK, "Double Edge Mask", NODE_CLASS_MATTE);
ntype.declare = file_ns::cmp_node_double_edge_mask_declare;
ntype.draw_buttons = file_ns::node_composit_buts_double_edge_mask;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** FILTER ******************** */
@ -26,6 +28,23 @@ static void node_composit_buts_filter(uiLayout *layout, bContext *UNUSED(C), Poi
uiItemR(layout, ptr, "filter_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
class FilterOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new FilterOperation(context, node);
}
} // namespace blender::nodes::node_composite_filter_cc
void register_node_type_cmp_filter()
@ -39,6 +58,7 @@ void register_node_type_cmp_filter()
ntype.draw_buttons = file_ns::node_composit_buts_filter;
ntype.labelfunc = node_filter_label;
ntype.flag |= NODE_PREVIEW;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_glare_cc {
@ -75,6 +77,23 @@ static void node_composit_buts_glare(uiLayout *layout, bContext *UNUSED(C), Poin
}
}
using namespace blender::realtime_compositor;
class GlareOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new GlareOperation(context, node);
}
} // namespace blender::nodes::node_composite_glare_cc
void register_node_type_cmp_glare()
@ -88,6 +107,7 @@ void register_node_type_cmp_glare()
ntype.draw_buttons = file_ns::node_composit_buts_glare;
node_type_init(&ntype, file_ns::node_composit_init_glare);
node_type_storage(&ntype, "NodeGlare", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** ID Mask ******************** */
@ -26,6 +28,23 @@ static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "use_antialiasing", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class IDMaskOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("ID value").pass_through(get_result("Alpha"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new IDMaskOperation(context, node);
}
} // namespace blender::nodes::node_composite_id_mask_cc
void register_node_type_cmp_idmask()
@ -37,6 +56,7 @@ void register_node_type_cmp_idmask()
cmp_node_type_base(&ntype, CMP_NODE_ID_MASK, "ID Mask", NODE_CLASS_CONVERTER);
ntype.declare = file_ns::cmp_node_idmask_declare;
ntype.draw_buttons = file_ns::node_composit_buts_id_mask;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Inpaint/ ******************** */
@ -25,6 +27,23 @@ static void node_composit_buts_inpaint(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "distance", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class InpaintOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new InpaintOperation(context, node);
}
} // namespace blender::nodes::node_composite_inpaint_cc
void register_node_type_cmp_inpaint()
@ -36,6 +55,7 @@ void register_node_type_cmp_inpaint()
cmp_node_type_base(&ntype, CMP_NODE_INPAINT, "Inpaint", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_inpaint_declare;
ntype.draw_buttons = file_ns::node_composit_buts_inpaint;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -14,6 +14,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Keying ******************** */
@ -63,6 +65,25 @@ static void node_composit_buts_keying(uiLayout *layout, bContext *UNUSED(C), Poi
uiItemR(layout, ptr, "blur_post", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class KeyingOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
get_result("Matte").allocate_invalid();
get_result("Edges").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new KeyingOperation(context, node);
}
} // namespace blender::nodes::node_composite_keying_cc
void register_node_type_cmp_keying()
@ -77,6 +98,7 @@ void register_node_type_cmp_keying()
node_type_init(&ntype, file_ns::node_composit_init_keying);
node_type_storage(
&ntype, "NodeKeyingData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -21,6 +21,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Keying Screen ******************** */
@ -78,6 +80,23 @@ static void node_composit_buts_keyingscreen(uiLayout *layout, bContext *C, Point
}
}
using namespace blender::realtime_compositor;
class KeyingScreenOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_result("Screen").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new KeyingScreenOperation(context, node);
}
} // namespace blender::nodes::node_composite_keyingscreen_cc
void register_node_type_cmp_keyingscreen()
@ -92,6 +111,7 @@ void register_node_type_cmp_keyingscreen()
ntype.initfunc_api = file_ns::node_composit_init_keyingscreen;
node_type_storage(
&ntype, "NodeKeyingScreenData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** LEVELS ******************** */
@ -31,6 +33,24 @@ static void node_composit_buts_view_levels(uiLayout *layout, bContext *UNUSED(C)
uiItemR(layout, ptr, "channel", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
class LevelsOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_result("Mean").allocate_invalid();
get_result("Std Dev").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new LevelsOperation(context, node);
}
} // namespace blender::nodes::node_composite_levels_cc
void register_node_type_cmp_view_levels()
@ -44,6 +64,7 @@ void register_node_type_cmp_view_levels()
ntype.draw_buttons = file_ns::node_composit_buts_view_levels;
ntype.flag |= NODE_PREVIEW;
node_type_init(&ntype, file_ns::node_composit_init_view_levels);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Map UV ******************** */
@ -26,6 +28,23 @@ static void node_composit_buts_map_uv(uiLayout *layout, bContext *UNUSED(C), Poi
uiItemR(layout, ptr, "alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class MapUVOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new MapUVOperation(context, node);
}
} // namespace blender::nodes::node_composite_map_uv_cc
void register_node_type_cmp_mapuv()
@ -37,6 +56,7 @@ void register_node_type_cmp_mapuv()
cmp_node_type_base(&ntype, CMP_NODE_MAP_UV, "Map UV", NODE_CLASS_DISTORT);
ntype.declare = file_ns::cmp_node_map_uv_declare;
ntype.draw_buttons = file_ns::node_composit_buts_map_uv;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Mask ******************** */
@ -74,6 +76,23 @@ static void node_composit_buts_mask(uiLayout *layout, bContext *C, PointerRNA *p
}
}
using namespace blender::realtime_compositor;
class MaskOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_result("Mask").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new MaskOperation(context, node);
}
} // namespace blender::nodes::node_composite_mask_cc
void register_node_type_cmp_mask()
@ -87,6 +106,7 @@ void register_node_type_cmp_mask()
ntype.draw_buttons = file_ns::node_composit_buts_mask;
node_type_init(&ntype, file_ns::node_composit_init_mask);
ntype.labelfunc = file_ns::node_mask_label;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
node_type_storage(&ntype, "NodeMask", node_free_standard_storage, node_copy_standard_storage);

View File

@ -12,6 +12,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Translate ******************** */
@ -81,6 +83,23 @@ static void node_composit_buts_moviedistortion(uiLayout *layout, bContext *C, Po
uiItemR(layout, ptr, "distortion_type", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
}
using namespace blender::realtime_compositor;
class MovieDistortionOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new MovieDistortionOperation(context, node);
}
} // namespace blender::nodes::node_composite_moviedistortion_cc
void register_node_type_cmp_moviedistortion()
@ -95,6 +114,7 @@ void register_node_type_cmp_moviedistortion()
ntype.labelfunc = file_ns::label;
ntype.initfunc_api = file_ns::init;
node_type_storage(&ntype, nullptr, file_ns::storage_free, file_ns::storage_copy);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -5,6 +5,8 @@
* \ingroup cmpnodes
*/
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** NORMALIZE single channel, useful for Z buffer ******************** */
@ -17,6 +19,23 @@ static void cmp_node_normalize_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Float>(N_("Value"));
}
using namespace blender::realtime_compositor;
class NormalizeOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Value").pass_through(get_result("Value"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new NormalizeOperation(context, node);
}
} // namespace blender::nodes::node_composite_normalize_cc
void register_node_type_cmp_normalize()
@ -27,6 +46,7 @@ void register_node_type_cmp_normalize()
cmp_node_type_base(&ntype, CMP_NODE_NORMALIZE, "Normalize", NODE_CLASS_OP_VECTOR);
ntype.declare = file_ns::cmp_node_normalize_declare;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -24,6 +24,8 @@
#include "IMB_openexr.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** OUTPUT FILE ******************** */
@ -439,6 +441,22 @@ static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, Poi
}
}
using namespace blender::realtime_compositor;
class OutputFileOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new OutputFileOperation(context, node);
}
} // namespace blender::nodes::node_composite_output_file_cc
void register_node_type_cmp_output_file()
@ -455,6 +473,7 @@ void register_node_type_cmp_output_file()
node_type_storage(
&ntype, "NodeImageMultiFile", file_ns::free_output_file, file_ns::copy_output_file);
node_type_update(&ntype, file_ns::update_output_file);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -5,6 +5,8 @@
* \ingroup cmpnodes
*/
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Pixelate ******************** */
@ -17,6 +19,23 @@ static void cmp_node_pixelate_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>(N_("Color"));
}
using namespace blender::realtime_compositor;
class PixelateOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Color").pass_through(get_result("Color"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new PixelateOperation(context, node);
}
} // namespace blender::nodes::node_composite_pixelate_cc
void register_node_type_cmp_pixelate()
@ -27,6 +46,7 @@ void register_node_type_cmp_pixelate()
cmp_node_type_base(&ntype, CMP_NODE_PIXELATE, "Pixelate", NODE_CLASS_OP_FILTER);
ntype.declare = file_ns::cmp_node_pixelate_declare;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -18,6 +18,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_planetrackdeform_cc {
@ -107,6 +109,24 @@ static void node_composit_buts_planetrackdeform(uiLayout *layout, bContext *C, P
}
}
using namespace blender::realtime_compositor;
class PlaneTrackDeformOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
get_result("Plane").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new PlaneTrackDeformOperation(context, node);
}
} // namespace blender::nodes::node_composite_planetrackdeform_cc
void register_node_type_cmp_planetrackdeform()
@ -121,6 +141,7 @@ void register_node_type_cmp_planetrackdeform()
ntype.initfunc_api = file_ns::init;
node_type_storage(
&ntype, "NodePlaneTrackDeformData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Scale ******************** */
@ -55,6 +57,23 @@ static void node_composit_buts_scale(uiLayout *layout, bContext *UNUSED(C), Poin
}
}
using namespace blender::realtime_compositor;
class ScaleOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new ScaleOperation(context, node);
}
} // namespace blender::nodes::node_composite_scale_cc
void register_node_type_cmp_scale()
@ -67,6 +86,7 @@ void register_node_type_cmp_scale()
ntype.declare = file_ns::cmp_node_scale_declare;
ntype.draw_buttons = file_ns::node_composit_buts_scale;
node_type_update(&ntype, file_ns::node_composite_update_scale);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -11,6 +11,8 @@
#include "BKE_context.h"
#include "BKE_lib_id.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Stabilize 2D ******************** */
@ -58,6 +60,23 @@ static void node_composit_buts_stabilize2d(uiLayout *layout, bContext *C, Pointe
uiItemR(layout, ptr, "invert", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class Stabilize2DOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new Stabilize2DOperation(context, node);
}
} // namespace blender::nodes::node_composite_stabilize2d_cc
void register_node_type_cmp_stabilize2d()
@ -70,6 +89,7 @@ void register_node_type_cmp_stabilize2d()
ntype.declare = file_ns::cmp_node_stabilize2d_declare;
ntype.draw_buttons = file_ns::node_composit_buts_stabilize2d;
ntype.initfunc_api = file_ns::init;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_sunbeams_cc {
@ -38,6 +40,23 @@ static void node_composit_buts_sunbeams(uiLayout *layout, bContext *UNUSED(C), P
ICON_NONE);
}
using namespace blender::realtime_compositor;
class SunBeamsOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new SunBeamsOperation(context, node);
}
} // namespace blender::nodes::node_composite_sunbeams_cc
void register_node_type_cmp_sunbeams()
@ -52,6 +71,7 @@ void register_node_type_cmp_sunbeams()
node_type_init(&ntype, file_ns::init);
node_type_storage(
&ntype, "NodeSunBeams", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -5,6 +5,8 @@
* \ingroup cmpnodes
*/
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** TEXTURE ******************** */
@ -23,6 +25,24 @@ static void cmp_node_texture_declare(NodeDeclarationBuilder &b)
b.add_output<decl::Color>(N_("Color"));
}
using namespace blender::realtime_compositor;
class TextureOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_result("Value").allocate_invalid();
get_result("Color").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new TextureOperation(context, node);
}
} // namespace blender::nodes::node_composite_texture_cc
void register_node_type_cmp_texture()
@ -34,6 +54,7 @@ void register_node_type_cmp_texture()
cmp_node_type_base(&ntype, CMP_NODE_TEXTURE, "Texture", NODE_CLASS_INPUT);
ntype.declare = file_ns::cmp_node_texture_declare;
ntype.flag |= NODE_PREVIEW;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -10,6 +10,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_tonemap_cc {
@ -58,6 +60,23 @@ static void node_composit_buts_tonemap(uiLayout *layout, bContext *UNUSED(C), Po
}
}
using namespace blender::realtime_compositor;
class ToneMapOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new ToneMapOperation(context, node);
}
} // namespace blender::nodes::node_composite_tonemap_cc
void register_node_type_cmp_tonemap()
@ -71,6 +90,7 @@ void register_node_type_cmp_tonemap()
ntype.draw_buttons = file_ns::node_composit_buts_tonemap;
node_type_init(&ntype, file_ns::node_composit_init_tonemap);
node_type_storage(&ntype, "NodeTonemap", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -18,6 +18,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
namespace blender::nodes::node_composite_trackpos_cc {
@ -102,6 +104,25 @@ static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRN
}
}
using namespace blender::realtime_compositor;
class TrackPositionOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_result("X").allocate_invalid();
get_result("Y").allocate_invalid();
get_result("Speed").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new TrackPositionOperation(context, node);
}
} // namespace blender::nodes::node_composite_trackpos_cc
void register_node_type_cmp_trackpos()
@ -116,6 +137,7 @@ void register_node_type_cmp_trackpos()
ntype.initfunc_api = file_ns::init;
node_type_storage(
&ntype, "NodeTrackPosData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** VECTOR BLUR ******************** */
@ -51,6 +53,23 @@ static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), Po
uiItemR(layout, ptr, "use_curved", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class VectorBlurOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new VectorBlurOperation(context, node);
}
} // namespace blender::nodes::node_composite_vec_blur_cc
void register_node_type_cmp_vecblur()
@ -65,6 +84,7 @@ void register_node_type_cmp_vecblur()
node_type_init(&ntype, file_ns::node_composit_init_vecblur);
node_type_storage(
&ntype, "NodeBlurData", node_free_standard_storage, node_copy_standard_storage);
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}

View File

@ -8,6 +8,8 @@
#include "UI_interface.h"
#include "UI_resources.h"
#include "COM_node_operation.hh"
#include "node_composite_util.hh"
/* **************** Z COMBINE ******************** */
@ -33,6 +35,24 @@ static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), P
uiItemR(col, ptr, "use_antialias_z", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
using namespace blender::realtime_compositor;
class ZCombineOperation : public NodeOperation {
public:
using NodeOperation::NodeOperation;
void execute() override
{
get_input("Image").pass_through(get_result("Image"));
get_result("Z").allocate_invalid();
}
};
static NodeOperation *get_compositor_operation(Context &context, DNode node)
{
return new ZCombineOperation(context, node);
}
} // namespace blender::nodes::node_composite_zcombine_cc
void register_node_type_cmp_zcombine()
@ -44,6 +64,7 @@ void register_node_type_cmp_zcombine()
cmp_node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR);
ntype.declare = file_ns::cmp_node_zcombine_declare;
ntype.draw_buttons = file_ns::node_composit_buts_zcombine;
ntype.get_compositor_operation = file_ns::get_compositor_operation;
nodeRegisterType(&ntype);
}