Blender V5.3
node_shader_point_info.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_output<decl::Vector>("Position"_ustr);
18 b.add_output<decl::Float>("Radius"_ustr);
19 b.add_output<decl::Float>("Random"_ustr);
20}
21
23 bNode *node,
24 bNodeExecData * /*execdata*/,
27{
28 return GPU_stack_link(mat, node, "node_point_info", in, out, GPU_shading_data());
29}
30
32#ifdef WITH_MATERIALX
33{
34 /* NOTE: This node isn't supported by MaterialX. */
35 return get_output_default(socket_out_->identifier, NodeItem::Type::Any);
36}
37#endif
39
40} // namespace nodes::node_shader_point_info_cc
41
42/* node type definition */
44{
45 namespace file_ns = nodes::node_shader_point_info_cc;
46
47 static bke::bNodeType ntype;
48
49 sh_node_type_base(&ntype, "ShaderNodePointInfo"_ustr, SH_NODE_POINT_INFO);
50 ntype.ui_name = "Point Info";
51 ntype.ui_description = "Retrieve information about points in a point cloud";
52 ntype.enum_name_legacy = "POINT_INFO";
54 ntype.declare = file_ns::node_declare;
55 ntype.gpu_fn = file_ns::node_shader_gpu_point_info;
56 ntype.materialx_fn = file_ns::node_shader_materialx;
57
59}
60
61} // namespace blender
#define NODE_CLASS_INPUT
Definition BKE_node.hh:478
#define SH_NODE_POINT_INFO
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
static int node_shader_gpu_point_info(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 register_node_type_sh_point_info()
void sh_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
GPUNodeLink * GPU_shading_data()
#define NODE_SHADER_MATERIALX_BEGIN
#define NODE_SHADER_MATERIALX_END
Defines a node type.
Definition BKE_node.hh:265
NodeMaterialXFunction materialx_fn
Definition BKE_node.hh:375
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
NodeDeclareFunction declare
Definition BKE_node.hh:393