Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_zcombine.cc
| Show All 22 Lines | |||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** Z COMBINE ******************** */ | /* **************** Z COMBINE ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes::node_composite_zcombine_cc { | ||||
| static void cmp_node_zcombine_declare(NodeDeclarationBuilder &b) | static void cmp_node_zcombine_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); | 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.f).max(10000.0f); | b.add_input<decl::Float>(N_("Z")).default_value(1.0f).min(0.f).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::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.f).max(10000.0f); | b.add_input<decl::Float>(N_("Z"), "Z_001").default_value(1.0f).min(0.f).max(10000.0f); | ||||
| b.add_output<decl::Color>(N_("Image")); | b.add_output<decl::Color>(N_("Image")); | ||||
| b.add_output<decl::Float>(N_("Z")); | b.add_output<decl::Float>(N_("Z")); | ||||
| } | } | ||||
| } // namespace blender::nodes | |||||
| static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | ||||
| { | { | ||||
| uiLayout *col; | uiLayout *col; | ||||
| col = uiLayoutColumn(layout, true); | col = uiLayoutColumn(layout, true); | ||||
| uiItemR(col, ptr, "use_alpha", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | 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); | uiItemR(col, ptr, "use_antialias_z", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | ||||
| } | } | ||||
| } // namespace blender::nodes::node_composite_zcombine_cc | |||||
| void register_node_type_cmp_zcombine() | void register_node_type_cmp_zcombine() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_composite_zcombine_cc; | |||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR, 0); | cmp_node_type_base(&ntype, CMP_NODE_ZCOMBINE, "Z Combine", NODE_CLASS_OP_COLOR); | ||||
| ntype.declare = blender::nodes::cmp_node_zcombine_declare; | ntype.declare = file_ns::cmp_node_zcombine_declare; | ||||
| ntype.draw_buttons = node_composit_buts_zcombine; | ntype.draw_buttons = file_ns::node_composit_buts_zcombine; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||