Subdiv: Tag result mesh with no loose edges/verts

Avoid possible calculations of loose edges later on if the coarse mesh
doesn't have loose edges or vertices. We expect these counts to be
cached already since `BKE_subdiv_converter_init_for_mesh` calls
`verts_no_face()` and `loose_edges()` already.

Related commits:
- 63689e4756
- 8e967cfeaf
This commit is contained in:
Hans Goudey
2023-04-23 15:13:02 -04:00
parent 473bb8a8b0
commit 54072154c5

View File

@@ -1194,10 +1194,17 @@ Mesh *BKE_subdiv_to_mesh(Subdiv *subdiv,
bit_vector.resize(subdiv_context.subdiv_display_edges.size());
threading::parallel_for_aligned(
span.index_range(), 4096, bits::BitsPerInt, [&](const IndexRange range) {
for (const int i : range) {
bit_vector[i].set(span[i]);
}
});
for (const int i : range) {
bit_vector[i].set(span[i]);
}
});
}
if (coarse_mesh->verts_no_face().count == 0) {
result->tag_loose_verts_none();
}
if (coarse_mesh->loose_edges().count == 0) {
result->loose_edges_tag_none();
}
if (subdiv->settings.is_simple) {