Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_realize_instances.cc
| Show All 15 Lines | |||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| #include "UI_interface.h" | #include "UI_interface.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| namespace blender::nodes::node_geo_realize_instances_cc { | namespace blender::nodes::node_geo_realize_instances_cc { | ||||
| static void geo_node_realize_instances_declare(NodeDeclarationBuilder &b) | static void node_declare(NodeDeclarationBuilder &b) | ||||
| { | { | ||||
| b.add_input<decl::Geometry>(N_("Geometry")); | b.add_input<decl::Geometry>(N_("Geometry")); | ||||
| b.add_output<decl::Geometry>(N_("Geometry")); | b.add_output<decl::Geometry>(N_("Geometry")); | ||||
| } | } | ||||
| static void geo_node_realize_instances_exec(GeoNodeExecParams params) | static void node_geo_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | ||||
| geometry_set = bke::geometry_set_realize_instances(geometry_set); | geometry_set = bke::geometry_set_realize_instances(geometry_set); | ||||
| params.set_output("Geometry", std::move(geometry_set)); | params.set_output("Geometry", std::move(geometry_set)); | ||||
| } | } | ||||
| } // namespace blender::nodes::node_geo_realize_instances_cc | } // namespace blender::nodes::node_geo_realize_instances_cc | ||||
| void register_node_type_geo_realize_instances() | void register_node_type_geo_realize_instances() | ||||
| { | { | ||||
| namespace file_ns = blender::nodes::node_geo_realize_instances_cc; | namespace file_ns = blender::nodes::node_geo_realize_instances_cc; | ||||
| static bNodeType ntype; | static bNodeType ntype; | ||||
| geo_node_type_base( | geo_node_type_base( | ||||
| &ntype, GEO_NODE_REALIZE_INSTANCES, "Realize Instances", NODE_CLASS_GEOMETRY, 0); | &ntype, GEO_NODE_REALIZE_INSTANCES, "Realize Instances", NODE_CLASS_GEOMETRY, 0); | ||||
| ntype.declare = file_ns::geo_node_realize_instances_declare; | ntype.declare = file_ns::node_declare; | ||||
| ntype.geometry_node_execute = file_ns::geo_node_realize_instances_exec; | ntype.geometry_node_execute = file_ns::node_geo_exec; | ||||
| nodeRegisterType(&ntype); | nodeRegisterType(&ntype); | ||||
| } | } | ||||