Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_remove_attribute.cc
| Show All 26 Lines | |||||
| { | { | ||||
| 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() || !U.experimental.use_named_attribute_nodes) { | if (name.empty() || !U.experimental.use_named_attribute_nodes) { | ||||
| params.set_output("Geometry", std::move(geometry_set)); | params.set_output("Geometry", std::move(geometry_set)); | ||||
| return; | return; | ||||
| } | } | ||||
| params.used_named_attribute(name, NamedAttributeUsage::Remove); | |||||
| std::atomic<bool> attribute_exists = false; | std::atomic<bool> attribute_exists = false; | ||||
| std::atomic<bool> cannot_delete = false; | std::atomic<bool> cannot_delete = false; | ||||
| geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { | geometry_set.modify_geometry_sets([&](GeometrySet &geometry_set) { | ||||
| for (const GeometryComponentType type : {GEO_COMPONENT_TYPE_MESH, | for (const GeometryComponentType type : {GEO_COMPONENT_TYPE_MESH, | ||||
| GEO_COMPONENT_TYPE_POINT_CLOUD, | GEO_COMPONENT_TYPE_POINT_CLOUD, | ||||
| GEO_COMPONENT_TYPE_CURVE, | GEO_COMPONENT_TYPE_CURVE, | ||||
| GEO_COMPONENT_TYPE_INSTANCES}) { | GEO_COMPONENT_TYPE_INSTANCES}) { | ||||
| ▲ Show 20 Lines • Show All 45 Lines • Show Last 20 Lines | |||||