Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/composite/nodes/node_composite_zcombine.cc')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_zcombine.cc38
1 files changed, 26 insertions, 12 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_zcombine.cc b/source/blender/nodes/composite/nodes/node_composite_zcombine.cc
index 79e4d449159..7a6d5b3af5f 100644
--- a/source/blender/nodes/composite/nodes/node_composite_zcombine.cc
+++ b/source/blender/nodes/composite/nodes/node_composite_zcombine.cc
@@ -21,31 +21,45 @@
* \ingroup cmpnodes
*/
+#include "UI_interface.h"
+#include "UI_resources.h"
+
#include "node_composite_util.hh"
/* **************** Z COMBINE ******************** */
-namespace blender::nodes {
+namespace blender::nodes::node_composite_zcombine_cc {
static void cmp_node_zcombine_declare(NodeDeclarationBuilder &b)
{
- b.add_input<decl::Color>("Image").default_value({1.0f, 1.0f, 1.0f, 1.0f});
- b.add_input<decl::Float>("Z").default_value(1.0f).min(0.0f).max(10000.0f);
- b.add_input<decl::Color>("Image", "Image_001").default_value({1.0f, 1.0f, 1.0f, 1.0f});
- b.add_input<decl::Float>("Z", "Z_001").default_value(1.0f).min(0.0f).max(10000.0f);
- b.add_output<decl::Color>("Image");
- b.add_output<decl::Float>("Z");
+ b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
+ b.add_input<decl::Float>(N_("Z")).default_value(1.0f).min(0.0f).max(10000.0f);
+ b.add_input<decl::Color>(N_("Image"), "Image_001").default_value({1.0f, 1.0f, 1.0f, 1.0f});
+ b.add_input<decl::Float>(N_("Z"), "Z_001").default_value(1.0f).min(0.0f).max(10000.0f);
+ b.add_output<decl::Color>(N_("Image"));
+ b.add_output<decl::Float>(N_("Z"));
+}
+
+static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
+{
+ uiLayout *col;
+
+ col = uiLayoutColumn(layout, true);
+ uiItemR(col, ptr, "use_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
+ uiItemR(col, ptr, "use_antialias_z", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
}
-} // namespace blender::nodes
+} // namespace blender::nodes::node_composite_zcombine_cc
-/* lazy coder NOTE: node->custom2 is abused to send signal. */
-void register_node_type_cmp_zcombine(void)
+void register_node_type_cmp_zcombine()
{
+ namespace file_ns = blender::nodes::node_composite_zcombine_cc;
+
static bNodeType ntype;
- cmp_node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, 0);
- ntype.declare = blender::nodes::cmp_node_zcombine_declare;
+ 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;
nodeRegisterType(&ntype);
}