Blender V5.3
node_geo_input_id.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
8
10{
11 b.add_output<decl::Int>("ID"_ustr)
12 .structure_type(StructureType::Field)
14 "The values from the \"id\" attribute on points, or the index if that attribute does "
15 "not "
16 "exist");
17}
18
20{
22}
23
24static void node_register()
25{
26 static bke::bNodeType ntype;
27
28 geo_node_type_base(&ntype, "GeometryNodeInputID"_ustr, GEO_NODE_INPUT_ID);
29 ntype.ui_name = "ID";
30 ntype.ui_description =
31 "Retrieve a stable random identifier value from the \"id\" attribute on the point domain, "
32 "or the index if the attribute does not exist";
33 ntype.enum_name_legacy = "INPUT_ID";
36 ntype.declare = node_declare;
38}
40
41} // namespace blender::nodes::node_geo_input_id_cc
#define NODE_CLASS_INPUT
Definition BKE_node.hh:478
#define GEO_NODE_INPUT_ID
#define NOD_REGISTER_NODE(REGISTER_FUNC)
static const fn::Field< int > & get_field()
void set_output(const UString identifier, T &&value)
void node_register_type(bNodeType &ntype)
Definition node.cc:2920
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
Defines a node type.
Definition BKE_node.hh:265
std::string ui_description
Definition BKE_node.hh:271
NodeGeometryExecFunction geometry_node_execute
Definition BKE_node.hh:385
const char * enum_name_legacy
Definition BKE_node.hh:274
NodeDeclareFunction declare
Definition BKE_node.hh:393