Blender  V3.3
node_composite_levels.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2006 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 /* **************** LEVELS ******************** */
14 
16 
18 {
19  b.add_input<decl::Color>(N_("Image")).default_value({0.0f, 0.0f, 0.0f, 1.0f});
20  b.add_output<decl::Float>(N_("Mean"));
21  b.add_output<decl::Float>(N_("Std Dev"));
22 }
23 
25 {
26  node->custom1 = 1; /* All channels. */
27 }
28 
30 {
31  uiItemR(layout, ptr, "channel", UI_ITEM_R_SPLIT_EMPTY_NAME, "", ICON_NONE);
32 }
33 
34 } // namespace blender::nodes::node_composite_levels_cc
35 
37 {
38  namespace file_ns = blender::nodes::node_composite_levels_cc;
39 
40  static bNodeType ntype;
41 
45  ntype.flag |= NODE_PREVIEW;
47 
48  nodeRegisterType(&ntype);
49 }
#define NODE_CLASS_OUTPUT
Definition: BKE_node.h:346
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
Definition: node.cc:4390
#define CMP_NODE_VIEW_LEVELS
Definition: BKE_node.h:1253
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define UNUSED(x)
#define NODE_PREVIEW
@ UI_ITEM_R_SPLIT_EMPTY_NAME
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
OperationNode * node
bNodeTree * ntree
static void cmp_node_levels_declare(NodeDeclarationBuilder &b)
static void node_composit_buts_view_levels(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void node_composit_init_view_levels(bNodeTree *UNUSED(ntree), bNode *node)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_cmp_view_levels()
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition: BKE_node.h:226
short flag
Definition: BKE_node.h:236
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