Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_sepcombRGBA.cc
| Show All 22 Lines | |||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** SEPARATE RGBA ******************** */ | /* **************** SEPARATE RGBA ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void cmp_node_seprgba_declare(NodeDeclarationBuilder &b) | static void cmp_node_seprgba_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Color>("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_output<decl::Float>("R"); | b.add_output<decl::Float>(N_("R")); | ||||
| b.add_output<decl::Float>("G"); | b.add_output<decl::Float>(N_("G")); | ||||
| b.add_output<decl::Float>("B"); | b.add_output<decl::Float>(N_("B")); | ||||
| b.add_output<decl::Float>("A"); | b.add_output<decl::Float>(N_("A")); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| void register_node_type_cmp_seprgba(void) | void register_node_type_cmp_seprgba(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTER, 0); | cmp_node_type_base(&ntype, CMP_NODE_SEPRGBA, "Separate RGBA", NODE_CLASS_CONVERTER, 0); | ||||
| ntype.declare = blender::nodes::cmp_node_seprgba_declare; | ntype.declare = blender::nodes::cmp_node_seprgba_declare; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||
| /* **************** COMBINE RGBA ******************** */ | /* **************** COMBINE RGBA ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void cmp_node_combrgba_declare(NodeDeclarationBuilder &b) | static void cmp_node_combrgba_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Float>("R").min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("R")).min(0.0f).max(1.0f); | ||||
| b.add_input<decl::Float>("G").min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("G")).min(0.0f).max(1.0f); | ||||
| b.add_input<decl::Float>("B").min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("B")).min(0.0f).max(1.0f); | ||||
| b.add_input<decl::Float>("A").default_value(1.0f).min(0.0f).max(1.0f); | b.add_input<decl::Float>(N_("A")).default_value(1.0f).min(0.0f).max(1.0f); | ||||
| b.add_output<decl::Color>("Image"); | b.add_output<decl::Color>(N_("Image")); | ||||
| } | } | ||||
| } // namespace blender::nodes | } // namespace blender::nodes | ||||
| void register_node_type_cmp_combrgba(void) | void register_node_type_cmp_combrgba(void) | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTER, 0); | cmp_node_type_base(&ntype, CMP_NODE_COMBRGBA, "Combine RGBA", NODE_CLASS_CONVERTER, 0); | ||||
| ntype.declare = blender::nodes::cmp_node_combrgba_declare; | ntype.declare = blender::nodes::cmp_node_combrgba_declare; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||