diff options
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_boolean.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_boolean.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_boolean.cc b/source/blender/nodes/geometry/nodes/node_geo_boolean.cc index daeca311e08..a6af74645b6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_boolean.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_boolean.cc @@ -2,6 +2,7 @@ #include "DNA_mesh_types.h" +#include "BKE_geometry_set_instances.hh" #include "BKE_mesh_boolean_convert.hh" #include "UI_interface.h" @@ -153,17 +154,15 @@ static void node_geo_exec(GeoNodeExecParams params) /* Store intersecting edges in attribute. */ if (attribute_outputs.intersecting_edges_id) { - MeshComponent mesh_component; - mesh_component.replace(result, GeometryOwnershipType::Editable); - OutputAttribute_Typed<bool> attribute = mesh_component.attribute_try_get_for_output_only<bool>( + MutableAttributeAccessor attributes = result->attributes_for_write(); + SpanAttributeWriter<bool> selection = attributes.lookup_or_add_for_write_only_span<bool>( attribute_outputs.intersecting_edges_id.get(), ATTR_DOMAIN_EDGE); - MutableSpan<bool> selection = attribute.as_span(); - selection.fill(false); + + selection.span.fill(false); for (const int i : intersecting_edges) { - selection[i] = true; + selection.span[i] = true; } - - attribute.save(); + selection.finish(); params.set_output( "Intersecting Edges", |