Blender V5.3
node_shader_squeeze.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2005 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "node_shader_util.hh"
10
11namespace blender {
12
14
16{
17 b.add_input<decl::Float>("Value"_ustr).default_value(0.0f).min(-100.0f).max(100.0f);
18 b.add_input<decl::Float>("Width"_ustr).default_value(1.0f).min(-100.0f).max(100.0f);
19 b.add_input<decl::Float>("Center"_ustr).default_value(0.0f).min(-100.0f).max(100.0f);
20 b.add_output<decl::Float>("Value"_ustr);
21}
22
24 bNode *node,
25 bNodeExecData * /*execdata*/,
28{
29 return GPU_stack_link(mat, node, "squeeze", in, out);
30}
31
32} // namespace nodes::node_shader_squeeze_cc
33
35{
36 namespace file_ns = nodes::node_shader_squeeze_cc;
37
38 static bke::bNodeType ntype;
39
40 sh_node_type_base(&ntype, "ShaderNodeSqueeze"_ustr, SH_NODE_SQUEEZE);
41 ntype.ui_name = "Squeeze Value (Legacy)";
42 ntype.ui_description = "Deprecated";
43 ntype.enum_name_legacy = "SQUEEZE";
45 ntype.gather_link_search_ops = nullptr;
46 ntype.declare = file_ns::node_declare;
47 ntype.gpu_fn = file_ns::gpu_shader_squeeze;
48
50}
51
52} // namespace blender
#define NODE_CLASS_CONVERTER
Definition BKE_node.hh:484
#define SH_NODE_SQUEEZE
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
static int gpu_shader_squeeze(GPUMaterial *mat, bNode *node, bNodeExecData *, GPUNodeStack *in, GPUNodeStack *out)
static void node_declare(NodeDeclarationBuilder &b)
BMesh Iterators.
bool GPU_stack_link(GPUMaterial *mat, const bNode *node, const char *name, GPUNodeStack *in, GPUNodeStack *out,...)
void sh_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
void register_node_type_sh_squeeze()
Defines a node type.
Definition BKE_node.hh:265
std::string ui_description
Definition BKE_node.hh:271
NodeGPUExecFunction gpu_fn
Definition BKE_node.hh:373
const char * enum_name_legacy
Definition BKE_node.hh:274
NodeGatherSocketLinkOperationsFunction gather_link_search_ops
Definition BKE_node.hh:409
NodeDeclareFunction declare
Definition BKE_node.hh:393