Fix: Changing sculpt multires level erases sculpt changes

The code which is responsible for applying data from coordinate grids to
displacement grids could be run as part of modifier evaluation, hence
using the safe version of accessing mesh data was returning a nullptr.

Pull Request: https://projects.blender.org/blender/blender/pulls/123907
This commit is contained in:
Sergey Sharybin 2024-06-28 16:36:56 +02:00 committed by Sergey Sharybin
parent 2c345cfe31
commit c309479912

@ -1548,7 +1548,7 @@ static void object_update_from_subsurf_ccg(Object *object)
}
/* Object was never evaluated, so can not have CCG subdivision surface. If it were evaluated, do
* not try to compute OpenSubDiv on the CPU as it is not needed here. */
Mesh *mesh_eval = BKE_object_get_evaluated_mesh_no_subsurf(object);
Mesh *mesh_eval = BKE_object_get_evaluated_mesh_no_subsurf_unchecked(object);
if (mesh_eval == nullptr) {
return;
}