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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user