PBVH: update mesh data pointers stored in pbvh #106271

Merged
Jacques Lucke merged 11 commits from JacquesLucke/blender:pbvh-update-pointers into main 2023-04-08 13:29:49 +02:00
1 changed files with 2 additions and 1 deletions
Showing only changes of commit 88e780afb3 - Show all commits

View File

@ -834,7 +834,8 @@ void BKE_pbvh_update_mesh_pointers(PBVH *pbvh, Mesh *mesh)
pbvh->polys = mesh->polys();
pbvh->corner_verts = mesh->corner_verts().data();
if (!pbvh->deformed) {
/* If it was deformed, a new array is allocated. */
/* Deformed positions not matching the original mesh are owned directly by the PBVH, and are
JacquesLucke marked this conversation as resolved Outdated

This comment is a bit confusing. I think a more correct phrasing would be Deformed positions not matching the original mesh are owned directly by the PBVH, and are set separately by #BKE_pbvh_vert_coords_apply (though I do suggest tweaking that a bit below).

This comment is a bit confusing. I think a more correct phrasing would be `Deformed positions not matching the original mesh are owned directly by the PBVH, and are set separately by #BKE_pbvh_vert_coords_apply` (though I do suggest tweaking that a bit below).
* set separately by #BKE_pbvh_vert_coords_apply. */
pbvh->vert_positions = BKE_mesh_vert_positions_for_write(mesh);
}