Blender V5.3
node_geo_set_geometry_bundle.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2025 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
6
9
11
13{
14 b.use_custom_socket_order();
15 b.allow_any_socket_order();
16 b.add_input<decl::Geometry>("Geometry"_ustr).description("Geometry to override the bundle of");
17 b.add_output<decl::Geometry>("Geometry"_ustr).propagate_all().align_with_previous();
18 b.add_input<decl::Bundle>("Bundle"_ustr);
19}
20
22{
23 GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"_ustr);
24 BundlePtr bundle = params.extract_input<BundlePtr>("Bundle"_ustr);
25 geometry_set.bundle_ptr() = bundle;
26 params.set_output("Geometry"_ustr, std::move(geometry_set));
27}
28
29static void node_register()
30{
31 static bke::bNodeType ntype;
32
33 geo_node_type_base(&ntype, "GeometryNodeSetGeometryBundle"_ustr);
34 ntype.ui_name = "Set Geometry Bundle";
35 ntype.ui_description = "Set the bundle of a geometry";
38 ntype.declare = node_declare;
41}
43
44} // namespace blender::nodes::node_geo_set_geometry_bundle
#define NODE_CLASS_GEOMETRY
Definition BKE_node.hh:492
#define NOD_REGISTER_NODE(REGISTER_FUNC)
T extract_input(const UString identifier)
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)
ImplicitSharingPtr< Bundle > BundlePtr
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
const nodes::BundlePtr & bundle_ptr() const
static constexpr int _160
Definition BKE_node.hh:246
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
NodeDeclareFunction declare
Definition BKE_node.hh:393