Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_attribute_remove.cc
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | static void remove_attribute(GeometryComponent &component, | ||||
| } | } | ||||
| } | } | ||||
| static void geo_node_attribute_remove_exec(GeoNodeExecParams params) | static void geo_node_attribute_remove_exec(GeoNodeExecParams params) | ||||
| { | { | ||||
| GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | GeometrySet geometry_set = params.extract_input<GeometrySet>("Geometry"); | ||||
| Vector<std::string> attribute_names = params.extract_multi_input<std::string>("Attribute"); | Vector<std::string> attribute_names = params.extract_multi_input<std::string>("Attribute"); | ||||
| geometry_set = geometry_set_realize_instances(geometry_set); | |||||
| if (geometry_set.has<MeshComponent>()) { | if (geometry_set.has<MeshComponent>()) { | ||||
| remove_attribute( | remove_attribute( | ||||
| geometry_set.get_component_for_write<MeshComponent>(), params, attribute_names); | geometry_set.get_component_for_write<MeshComponent>(), params, attribute_names); | ||||
| } | } | ||||
| if (geometry_set.has<PointCloudComponent>()) { | if (geometry_set.has<PointCloudComponent>()) { | ||||
| remove_attribute( | remove_attribute( | ||||
| geometry_set.get_component_for_write<PointCloudComponent>(), params, attribute_names); | geometry_set.get_component_for_write<PointCloudComponent>(), params, attribute_names); | ||||
| } | } | ||||
| Show All 19 Lines | |||||