Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/composite/nodes/node_composite_keying.cc
| Show All 15 Lines | |||||
| * The Original Code is Copyright (C) 2011 Blender Foundation. | * The Original Code is Copyright (C) 2011 Blender Foundation. | ||||
| * All rights reserved. | * All rights reserved. | ||||
| */ | */ | ||||
| /** \file | /** \file | ||||
| * \ingroup cmpnodes | * \ingroup cmpnodes | ||||
| */ | */ | ||||
| #include "BLI_math_base.h" | |||||
| #include "BLT_translation.h" | #include "BLT_translation.h" | ||||
| #include "DNA_movieclip_types.h" | #include "DNA_movieclip_types.h" | ||||
| #include "BLI_math_base.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | |||||
| #include "node_composite_util.hh" | #include "node_composite_util.hh" | ||||
| /* **************** Keying ******************** */ | /* **************** Keying ******************** */ | ||||
| namespace blender::nodes { | namespace blender::nodes { | ||||
| static void cmp_node_keying_declare(NodeDeclarationBuilder &b) | static void cmp_node_keying_declare(NodeDeclarationBuilder &b) | ||||
| Show All 18 Lines | static void node_composit_init_keying(bNodeTree *UNUSED(ntree), bNode *node) | ||||
| data->despill_factor = 1.0f; | data->despill_factor = 1.0f; | ||||
| data->edge_kernel_radius = 3; | data->edge_kernel_radius = 3; | ||||
| data->edge_kernel_tolerance = 0.1f; | data->edge_kernel_tolerance = 0.1f; | ||||
| data->clip_black = 0.0f; | data->clip_black = 0.0f; | ||||
| data->clip_white = 1.0f; | data->clip_white = 1.0f; | ||||
| node->storage = data; | node->storage = data; | ||||
| } | } | ||||
| static void node_composit_buts_keying(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) | |||||
| { | |||||
| /* bNode *node = (bNode*)ptr->data; */ /* UNUSED */ | |||||
| uiItemR(layout, ptr, "blur_pre", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "screen_balance", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "despill_factor", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "despill_balance", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "edge_kernel_radius", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "edge_kernel_tolerance", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "clip_black", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "clip_white", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "dilate_distance", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "feather_falloff", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "feather_distance", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| uiItemR(layout, ptr, "blur_post", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE); | |||||
| } | |||||
| void register_node_type_cmp_keying() | void register_node_type_cmp_keying() | ||||
| { | { | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| cmp_node_type_base(&ntype, CMP_NODE_KEYING, "Keying", NODE_CLASS_MATTE, 0); | cmp_node_type_base(&ntype, CMP_NODE_KEYING, "Keying", NODE_CLASS_MATTE, 0); | ||||
| ntype.declare = blender::nodes::cmp_node_keying_declare; | ntype.declare = blender::nodes::cmp_node_keying_declare; | ||||
| ntype.draw_buttons = node_composit_buts_keying; | |||||
| node_type_init(&ntype, node_composit_init_keying); | node_type_init(&ntype, node_composit_init_keying); | ||||
| node_type_storage( | node_type_storage( | ||||
| &ntype, "NodeKeyingData", node_free_standard_storage, node_copy_standard_storage); | &ntype, "NodeKeyingData", node_free_standard_storage, node_copy_standard_storage); | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||