Fix #143238: Weight & Vertex Paint crash when applying deform modifier

Fix in dd651ef5d6 was incomplete, the
cache logic needs to match as well to ensure that the correct cache is
being populated or set as dirty when updated.

Pull Request: https://projects.blender.org/blender/blender/pulls/143968
This commit is contained in:
Sean Kim
2025-08-05 01:07:41 +02:00
committed by Sean Kim
parent 283bc177a4
commit d3918515d1

View File

@@ -914,6 +914,10 @@ static const SharedCache<Vector<float3>> &vert_normals_cache_eval(const Object &
return mesh_eval->runtime->vert_normals_true_cache;
}
}
if (!ss.deform_cos.is_empty()) {
BLI_assert(ss.deform_cos.size() == mesh_orig.verts_num);
return ss.vert_normals_deform;
}
if (const Mesh *mesh_eval = BKE_object_get_mesh_deform_eval(&object_eval)) {
return mesh_eval->runtime->vert_normals_true_cache;
}
@@ -945,6 +949,10 @@ static const SharedCache<Vector<float3>> &face_normals_cache_eval(const Object &
return mesh_eval->runtime->face_normals_true_cache;
}
}
if (!ss.deform_cos.is_empty()) {
BLI_assert(ss.deform_cos.size() == mesh_orig.verts_num);
return ss.face_normals_deform;
}
if (const Mesh *mesh_eval = BKE_object_get_mesh_deform_eval(&object_eval)) {
return mesh_eval->runtime->face_normals_true_cache;
}