Blender  V3.3
node_composite_double_edge_mask.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. All rights reserved. */
3 
8 #include "UI_interface.h"
9 #include "UI_resources.h"
10 
11 #include "node_composite_util.hh"
12 
13 /* **************** Double Edge Mask ******************** */
14 
16 
18 {
19  b.add_input<decl::Float>(N_("Inner Mask")).default_value(0.8f).min(0.0f).max(1.0f);
20  b.add_input<decl::Float>(N_("Outer Mask")).default_value(0.8f).min(0.0f).max(1.0f);
21  b.add_output<decl::Float>(N_("Mask"));
22 }
23 
25  bContext *UNUSED(C),
26  PointerRNA *ptr)
27 {
28  uiLayout *col;
29 
30  col = uiLayoutColumn(layout, false);
31 
32  uiItemL(col, IFACE_("Inner Edge:"), ICON_NONE);
33  uiItemR(col, ptr, "inner_mode", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
34  uiItemL(col, IFACE_("Buffer Edge:"), ICON_NONE);
35  uiItemR(col, ptr, "edge_mode", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
36 }
37 
38 } // namespace blender::nodes::node_composite_double_edge_mask_cc
39 
41 {
43 
44  static bNodeType ntype; /* Allocate a node type data structure. */
45 
46  cmp_node_type_base(&ntype, CMP_NODE_DOUBLEEDGEMASK, "Double Edge Mask", NODE_CLASS_MATTE);
49 
50  nodeRegisterType(&ntype);
51 }
#define NODE_CLASS_MATTE
Definition: BKE_node.h:352
#define CMP_NODE_DOUBLEEDGEMASK
Definition: BKE_node.h:1261
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define UNUSED(x)
#define IFACE_(msgid)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
void uiItemL(uiLayout *layout, const char *name, int icon)
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
uint col
static void cmp_node_double_edge_mask_declare(NodeDeclarationBuilder &b)
static void node_composit_buts_double_edge_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_cmp_doubleedgemask()
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition: BKE_node.h:226
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
Definition: BKE_node.h:244
NodeDeclareFunction declare
Definition: BKE_node.h:324
#define N_(msgid)
PointerRNA * ptr
Definition: wm_files.c:3480