Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_keyingscreen.cc
- This file was moved from source/blender/nodes/composite/nodes/node_composite_keyingscreen.c.
| Show All 20 Lines | |||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #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.h" | #include "node_composite_util.hh" | ||||
| /* **************** Translate ******************** */ | /* **************** Translate ******************** */ | ||||
| static bNodeSocketTemplate cmp_node_keyingscreen_out[] = { | static bNodeSocketTemplate cmp_node_keyingscreen_out[] = { | ||||
| {SOCK_RGBA, "Screen"}, | {SOCK_RGBA, "Screen"}, | ||||
| {-1, ""}, | {-1, ""}, | ||||
| }; | }; | ||||
| 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 *data = (NodeKeyingScreenData *)MEM_callocN(sizeof(NodeKeyingScreenData), | ||||
| "node keyingscreen data"); | |||||
| data = MEM_callocN(sizeof(NodeKeyingScreenData), "node keyingscreen data"); | |||||
| node->storage = data; | node->storage = data; | ||||
| } | } | ||||
| void register_node_type_cmp_keyingscreen(void) | void register_node_type_cmp_keyingscreen(void) | ||||
| { | { | ||||
| 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, NULL, cmp_node_keyingscreen_out); | node_type_socket_templates(&ntype, nullptr, cmp_node_keyingscreen_out); | ||||
| 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); | ||||
| } | } | ||||