Blender  V3.3
node_composite_sepcomb_ycca.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 "node_composite_util.hh"
9 
10 /* **************** SEPARATE YCCA ******************** */
11 
13 
15 {
16  b.add_input<decl::Color>(N_("Image")).default_value({1.0f, 1.0f, 1.0f, 1.0f});
17  b.add_output<decl::Float>(N_("Y"));
18  b.add_output<decl::Float>(N_("Cb"));
19  b.add_output<decl::Float>(N_("Cr"));
20  b.add_output<decl::Float>(N_("A"));
21 }
22 
24 {
25  node->custom1 = 1; /* BLI_YCC_ITU_BT709 */
26 }
27 
28 } // namespace blender::nodes::node_composite_sepcomb_ycca_cc
29 
31 {
33 
34  static bNodeType ntype;
35 
39  ntype.gather_link_search_ops = nullptr;
40 
41  nodeRegisterType(&ntype);
42 }
43 
44 /* **************** COMBINE YCCA ******************** */
45 
47 
49 {
50  b.add_input<decl::Float>(N_("Y")).min(0.0f).max(1.0f);
51  b.add_input<decl::Float>(N_("Cb")).default_value(0.5f).min(0.0f).max(1.0f);
52  b.add_input<decl::Float>(N_("Cr")).default_value(0.5f).min(0.0f).max(1.0f);
53  b.add_input<decl::Float>(N_("A")).default_value(1.0f).min(0.0f).max(1.0f);
54  b.add_output<decl::Color>(N_("Image"));
55 }
56 
58 {
59  node->custom1 = 1; /* BLI_YCC_ITU_BT709 */
60 }
61 
62 } // namespace blender::nodes::node_composite_sepcomb_ycca_cc
63 
65 {
67 
68  static bNodeType ntype;
69 
73  ntype.gather_link_search_ops = nullptr;
74 
75  nodeRegisterType(&ntype);
76 }
#define CMP_NODE_COMBYCCA_LEGACY
Definition: BKE_node.h:1227
#define NODE_CLASS_CONVERTER
Definition: BKE_node.h:351
void node_type_init(struct bNodeType *ntype, void(*initfunc)(struct bNodeTree *ntree, struct bNode *node))
Definition: node.cc:4390
#define CMP_NODE_SEPYCCA_LEGACY
Definition: BKE_node.h:1226
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
#define UNUSED(x)
OperationNode * node
bNodeTree * ntree
static void cmp_node_combycca_declare(NodeDeclarationBuilder &b)
static void node_composit_init_mode_sepycca(bNodeTree *UNUSED(ntree), bNode *node)
static void node_composit_init_mode_combycca(bNodeTree *UNUSED(ntree), bNode *node)
static void cmp_node_sepycca_declare(NodeDeclarationBuilder &b)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_cmp_sepycca()
void register_node_type_cmp_combycca()
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
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition: BKE_node.h:335
NodeDeclareFunction declare
Definition: BKE_node.h:324
#define N_(msgid)