Blender
V3.3
source
blender
nodes
composite
nodes
node_composite_texture.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
/* **************** TEXTURE ******************** */
11
12
namespace
blender::nodes::node_composite_texture_cc
{
13
14
static
void
cmp_node_texture_declare
(
NodeDeclarationBuilder
&
b
)
15
{
16
b
.add_input<
decl::Vector
>(
N_
(
"Offset"
)).
min
(-2.0f).max(2.0f).subtype(
PROP_TRANSLATION
);
17
b
.add_input<
decl::Vector
>(
N_
(
"Scale"
))
18
.default_value({1.0f, 1.0f, 1.0f})
19
.
min
(-10.0f)
20
.max(10.0f)
21
.subtype(
PROP_XYZ
);
22
b
.add_output<
decl::Float
>(
N_
(
"Value"
));
23
b
.add_output<
decl::Color
>(
N_
(
"Color"
));
24
}
25
26
}
// namespace blender::nodes::node_composite_texture_cc
27
28
void
register_node_type_cmp_texture
()
29
{
30
namespace
file_ns =
blender::nodes::node_composite_texture_cc
;
31
32
static
bNodeType
ntype;
33
34
cmp_node_type_base
(&ntype,
CMP_NODE_TEXTURE
,
"Texture"
,
NODE_CLASS_INPUT
);
35
ntype.
declare
=
file_ns::cmp_node_texture_declare
;
36
ntype.
flag
|=
NODE_PREVIEW
;
37
38
nodeRegisterType
(&ntype);
39
}
CMP_NODE_TEXTURE
#define CMP_NODE_TEXTURE
Definition:
BKE_node.h:1219
NODE_CLASS_INPUT
#define NODE_CLASS_INPUT
Definition:
BKE_node.h:345
nodeRegisterType
void nodeRegisterType(struct bNodeType *ntype)
Definition:
node.cc:1357
NODE_PREVIEW
#define NODE_PREVIEW
Definition:
DNA_node_types.h:341
PROP_XYZ
@ PROP_XYZ
Definition:
RNA_types.h:162
PROP_TRANSLATION
@ PROP_TRANSLATION
Definition:
RNA_types.h:154
blender::nodes::NodeDeclarationBuilder
Definition:
NOD_node_declaration.hh:279
blender::nodes::decl::Color
Definition:
NOD_socket_declarations.hh:121
blender::nodes::decl::Float
Definition:
NOD_socket_declarations.hh:16
blender::nodes::decl::Vector
Definition:
NOD_socket_declarations.hh:72
blender::nodes::node_composite_texture_cc
Definition:
node_composite_texture.cc:12
blender::nodes::node_composite_texture_cc::cmp_node_texture_declare
static void cmp_node_texture_declare(NodeDeclarationBuilder &b)
Definition:
node_composite_texture.cc:14
usdtokens::b
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
register_node_type_cmp_texture
void register_node_type_cmp_texture()
Definition:
node_composite_texture.cc:28
cmp_node_type_base
void cmp_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
Definition:
node_composite_util.cc:34
node_composite_util.hh
min
#define min(a, b)
Definition:
sort.c:35
bNodeType
Defines a node type.
Definition:
BKE_node.h:226
bNodeType::flag
short flag
Definition:
BKE_node.h:236
bNodeType::declare
NodeDeclareFunction declare
Definition:
BKE_node.h:324
N_
#define N_(msgid)
Definition:
versioning_userdef.c:46
Generated on Tue Oct 22 2024 13:18:25 for Blender by
doxygen
1.9.1