Blender  V3.3
node_composite_brightness.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 /* **************** Bright and Contrast ******************** */
14 
16 
18 {
19  b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
20  b.add_input<decl::Float>(N_("Bright")).min(-100.0f).max(100.0f);
21  b.add_input<decl::Float>(N_("Contrast")).min(-100.0f).max(100.0f);
22  b.add_output<decl::Color>(N_("Image"));
23 }
24 
26 {
27  node->custom1 = 1;
28 }
29 
31  bContext *UNUSED(C),
32  PointerRNA *ptr)
33 {
34  uiItemR(layout, ptr, "use_premultiply", UI_ITEM_R_SPLIT_EMPTY_NAME, nullptr, ICON_NONE);
35 }
36 
37 } // namespace blender::nodes::node_composite_brightness_cc
38 
40 {
42 
43  static bNodeType ntype;
44 
49 
50  nodeRegisterType(&ntype);
51 }
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
Definition: node.cc:4390
#define NODE_CLASS_OP_COLOR
Definition: BKE_node.h:347
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define CMP_NODE_BRIGHTCONTRAST
Definition: BKE_node.h:1244
#define UNUSED(x)
@ 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 node_composit_buts_brightcontrast(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
static void cmp_node_brightcontrast_declare(NodeDeclarationBuilder &b)
static void node_composit_init_brightcontrast(bNodeTree *UNUSED(ntree), bNode *node)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_cmp_brightcontrast()
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
#define min(a, b)
Definition: sort.c:35
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