Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
| /* SPDX-License-Identifier: GPL-2.0-or-later */ | /* SPDX-License-Identifier: GPL-2.0-or-later */ | ||||
| #include "node_geometry_util.hh" | #include "node_geometry_util.hh" | ||||
| #include "NOD_socket_search_link.hh" | #include "NOD_socket_search_link.hh" | ||||
| namespace blender::nodes::node_geo_remove_attribute_cc { | namespace blender::nodes::node_geo_remove_attribute_cc { | ||||
| static void node_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_input<decl::String>(N_("Name")).is_attribute_name(); | b.add_input<decl::String>(N_("Name")).is_attribute_name(); | ||||
| b.add_output<decl::Geometry>(N_("Geometry")); | b.add_output<decl::Geometry>(N_("Geometry")).propagate_from_auto(); | ||||
| } | } | ||||
| static void node_geo_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"); | ||||
| const std::string name = params.extract_input<std::string>("Name"); | const std::string name = params.extract_input<std::string>("Name"); | ||||
| if (name.empty()) { | if (name.empty()) { | ||||
| params.set_output("Geometry", std::move(geometry_set)); | params.set_output("Geometry", std::move(geometry_set)); | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||