From bb69c19f08ac681d4386325e4318ebfbef2e9531 Mon Sep 17 00:00:00 2001 From: Aaron Carlisle Date: Thu, 6 Jan 2022 20:51:23 -0500 Subject: Cleanup: Fix spelling in filename --- source/blender/nodes/composite/CMakeLists.txt | 2 +- .../composite/nodes/node_composite_luma_matte.cc | 73 ++++++++++++++++++++++ .../composite/nodes/node_composite_lumma_matte.cc | 73 ---------------------- 3 files changed, 74 insertions(+), 74 deletions(-) create mode 100644 source/blender/nodes/composite/nodes/node_composite_luma_matte.cc delete mode 100644 source/blender/nodes/composite/nodes/node_composite_lumma_matte.cc (limited to 'source') diff --git a/source/blender/nodes/composite/CMakeLists.txt b/source/blender/nodes/composite/CMakeLists.txt index 6818c08d6ed..41bcaba22bf 100644 --- a/source/blender/nodes/composite/CMakeLists.txt +++ b/source/blender/nodes/composite/CMakeLists.txt @@ -82,7 +82,7 @@ set(SRC nodes/node_composite_keyingscreen.cc nodes/node_composite_lensdist.cc nodes/node_composite_levels.cc - nodes/node_composite_lumma_matte.cc + nodes/node_composite_luma_matte.cc nodes/node_composite_map_range.cc nodes/node_composite_map_uv.cc nodes/node_composite_map_value.cc diff --git a/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc b/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc new file mode 100644 index 00000000000..313bbf73955 --- /dev/null +++ b/source/blender/nodes/composite/nodes/node_composite_luma_matte.cc @@ -0,0 +1,73 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * The Original Code is Copyright (C) 2006 Blender Foundation. + * All rights reserved. + */ + +/** \file + * \ingroup cmpnodes + */ + +#include "UI_interface.h" +#include "UI_resources.h" + +#include "node_composite_util.hh" + +/* ******************* Luma Matte Node ********************************* */ + +namespace blender::nodes { + +static void cmp_node_luma_matte_declare(NodeDeclarationBuilder &b) +{ + b.add_input(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); + b.add_output(N_("Image")); + b.add_output(N_("Matte")); +} + +} // namespace blender::nodes + +static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode *node) +{ + NodeChroma *c = MEM_cnew(__func__); + node->storage = c; + c->t1 = 1.0f; + c->t2 = 0.0f; +} + +static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) +{ + uiLayout *col; + + col = uiLayoutColumn(layout, true); + uiItemR( + col, ptr, "limit_max", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, nullptr, ICON_NONE); + uiItemR( + col, ptr, "limit_min", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, nullptr, ICON_NONE); +} + +void register_node_type_cmp_luma_matte() +{ + static bNodeType ntype; + + cmp_node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE); + ntype.declare = blender::nodes::cmp_node_luma_matte_declare; + ntype.draw_buttons = node_composit_buts_luma_matte; + ntype.flag |= NODE_PREVIEW; + node_type_init(&ntype, node_composit_init_luma_matte); + node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); + + nodeRegisterType(&ntype); +} diff --git a/source/blender/nodes/composite/nodes/node_composite_lumma_matte.cc b/source/blender/nodes/composite/nodes/node_composite_lumma_matte.cc deleted file mode 100644 index 313bbf73955..00000000000 --- a/source/blender/nodes/composite/nodes/node_composite_lumma_matte.cc +++ /dev/null @@ -1,73 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * The Original Code is Copyright (C) 2006 Blender Foundation. - * All rights reserved. - */ - -/** \file - * \ingroup cmpnodes - */ - -#include "UI_interface.h" -#include "UI_resources.h" - -#include "node_composite_util.hh" - -/* ******************* Luma Matte Node ********************************* */ - -namespace blender::nodes { - -static void cmp_node_luma_matte_declare(NodeDeclarationBuilder &b) -{ - b.add_input(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f}); - b.add_output(N_("Image")); - b.add_output(N_("Matte")); -} - -} // namespace blender::nodes - -static void node_composit_init_luma_matte(bNodeTree *UNUSED(ntree), bNode *node) -{ - NodeChroma *c = MEM_cnew(__func__); - node->storage = c; - c->t1 = 1.0f; - c->t2 = 0.0f; -} - -static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) -{ - uiLayout *col; - - col = uiLayoutColumn(layout, true); - uiItemR( - col, ptr, "limit_max", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, nullptr, ICON_NONE); - uiItemR( - col, ptr, "limit_min", UI_ITEM_R_SPLIT_EMPTY_NAME | UI_ITEM_R_SLIDER, nullptr, ICON_NONE); -} - -void register_node_type_cmp_luma_matte() -{ - static bNodeType ntype; - - cmp_node_type_base(&ntype, CMP_NODE_LUMA_MATTE, "Luminance Key", NODE_CLASS_MATTE); - ntype.declare = blender::nodes::cmp_node_luma_matte_declare; - ntype.draw_buttons = node_composit_buts_luma_matte; - ntype.flag |= NODE_PREVIEW; - node_type_init(&ntype, node_composit_init_luma_matte); - node_type_storage(&ntype, "NodeChroma", node_free_standard_storage, node_copy_standard_storage); - - nodeRegisterType(&ntype); -} -- cgit v1.2.3