Blender  V3.3
node_geo_input_id.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #include "node_geometry_util.hh"
4 
6 
8 {
9  b.add_output<decl::Int>(N_("ID")).field_source().description(
10  N_("The values from the \"id\" attribute on points, or the index if that attribute does not "
11  "exist"));
12 }
13 
15 {
16  Field<int> position_field{std::make_shared<bke::IDAttributeFieldInput>()};
17  params.set_output("ID", std::move(position_field));
18 }
19 
20 } // namespace blender::nodes::node_geo_input_id_cc
21 
23 {
24  namespace file_ns = blender::nodes::node_geo_input_id_cc;
25 
26  static bNodeType ntype;
27 
31  nodeRegisterType(&ntype);
32 }
#define NODE_CLASS_INPUT
Definition: BKE_node.h:345
#define GEO_NODE_INPUT_ID
Definition: BKE_node.h:1475
void nodeRegisterType(struct bNodeType *ntype)
Definition: node.cc:1357
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
static void node_declare(NodeDeclarationBuilder &b)
static void node_geo_exec(GeoNodeExecParams params)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
void register_node_type_geo_input_id()
void geo_node_type_base(bNodeType *ntype, int type, const char *name, short nclass)
Defines a node type.
Definition: BKE_node.h:226
NodeGeometryExecFunction geometry_node_execute
Definition: BKE_node.h:316
NodeDeclareFunction declare
Definition: BKE_node.h:324
#define N_(msgid)