Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc
| Show All 22 Lines | |||||
| #include "DNA_movieclip_types.h" | #include "DNA_movieclip_types.h" | ||||
| #include "BLI_math_base.h" | #include "BLI_math_base.h" | ||||
| #include "BLI_math_color.h" | #include "BLI_math_color.h" | ||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** Translate ******************** */ | /* **************** Keying Screen ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_keyingscreen_out[] = { | namespace blender::nodes { | ||||
| {SOCK_RGBA, "Screen"}, | |||||
| {-1, ""}, | static void cmp_node_keyingscreen_declare(NodeDeclarationBuilder &b) | ||||
| }; | { | ||||
| b.add_output<decl::Color>(N_("Screen")); | |||||
| } | |||||
| } // namespace blender::nodes | |||||
| static void node_composit_init_keyingscreen(bNodeTree *UNUSED(ntree), bNode *node) | static void node_composit_init_keyingscreen(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| { | { | ||||
| NodeKeyingScreenData *data = (NodeKeyingScreenData *)MEM_callocN(sizeof(NodeKeyingScreenData), | NodeKeyingScreenData *data = (NodeKeyingScreenData *)MEM_callocN(sizeof(NodeKeyingScreenData), | ||||
| "node keyingscreen data"); | "node keyingscreen data"); | ||||
| node->storage = data; | node->storage = data; | ||||
| } | } | ||||
| void register_node_type_cmp_keyingscreen(void) | void register_node_type_cmp_keyingscreen() | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_KEYINGSCREEN, "Keying Screen", NODE_CLASS_MATTE, 0); | cmp_node_type_base(&ntype, CMP_NODE_KEYINGSCREEN, "Keying Screen", NODE_CLASS_MATTE, 0); | ||||
| node_type_socket_templates(&ntype, nullptr, cmp_node_keyingscreen_out); | ntype.declare = blender::nodes::cmp_node_keyingscreen_declare; | ||||
| node_type_init(&ntype, node_composit_init_keyingscreen); | node_type_init(&ntype, node_composit_init_keyingscreen); | ||||
| node_type_storage( | node_type_storage( | ||||
| &ntype, "NodeKeyingScreenData", node_free_standard_storage, node_copy_standard_storage); | &ntype, "NodeKeyingScreenData", node_free_standard_storage, node_copy_standard_storage); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||