Fix #108537: Incorrect early return in delete geometry node
Fix after 50bfe1dfe3. Early return can be for unchanged
all geometry domains only.
Pull Request: https://projects.blender.org/blender/blender/pulls/108540
This commit is contained in:
committed by
Hans Goudey
parent
2d0bd33eda
commit
457f423719
@@ -276,7 +276,10 @@ std::optional<Mesh *> mesh_copy_selection(
|
||||
if (vert_mask.is_empty()) {
|
||||
return nullptr;
|
||||
}
|
||||
if (vert_mask.size() == src_mesh.totvert) {
|
||||
const bool same_verts = vert_mask.size() == src_mesh.totvert;
|
||||
const bool same_edges = edge_mask.size() == src_mesh.totedge;
|
||||
const bool same_polys = poly_mask.size() == src_mesh.totpoly;
|
||||
if (same_verts && same_edges && same_polys) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -408,6 +411,12 @@ std::optional<Mesh *> mesh_copy_selection_keep_verts(
|
||||
break;
|
||||
}
|
||||
|
||||
const bool same_edges = edge_mask.size() == src_mesh.totedge;
|
||||
const bool same_polys = poly_mask.size() == src_mesh.totpoly;
|
||||
if (same_edges && same_polys) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Mesh *dst_mesh = create_mesh_no_attributes(
|
||||
src_mesh, src_mesh.totvert, edge_mask.size(), poly_mask.size(), 0);
|
||||
bke::MutableAttributeAccessor dst_attributes = dst_mesh->attributes_for_write();
|
||||
@@ -488,6 +497,11 @@ std::optional<Mesh *> mesh_copy_selection_keep_edges(
|
||||
break;
|
||||
}
|
||||
|
||||
const bool same_polys = poly_mask.size() == src_mesh.totpoly;
|
||||
if (same_polys) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Mesh *dst_mesh = create_mesh_no_attributes(
|
||||
src_mesh, src_mesh.totvert, src_mesh.totedge, poly_mask.size(), 0);
|
||||
bke::MutableAttributeAccessor dst_attributes = dst_mesh->attributes_for_write();
|
||||
|
||||
Reference in New Issue
Block a user