Fix #129448: Undoing face set changes produces artifacts on dense mesh

Introduced in 60ab232afb

An incorrect subset of nodes was calculated as the code prior to this
commit was inspecting vertex indices instead of face indices.

Pull Request: https://projects.blender.org/blender/blender/pulls/129487
This commit is contained in:
Sean Kim
2024-10-28 22:52:40 +01:00
committed by Sean Kim
parent d87f604a0d
commit f408531b9b

View File

@@ -987,7 +987,7 @@ static void restore_list(bContext *C, Depsgraph *depsgraph, StepData &step_data)
MutableSpan<bke::pbvh::MeshNode> nodes = pbvh.nodes<bke::pbvh::MeshNode>();
const IndexMask changed_nodes = IndexMask::from_predicate(
node_mask, GrainSize(1), memory, [&](const int i) {
return indices_contain_true(modified_faces, nodes[i].all_verts());
return indices_contain_true(modified_faces, nodes[i].faces());
});
pbvh.tag_face_sets_changed(changed_nodes);
}