diff --git a/source/blender/blenkernel/intern/editmesh.cc b/source/blender/blenkernel/intern/editmesh.cc index a45d44573fc..a7b285f827f 100644 --- a/source/blender/blenkernel/intern/editmesh.cc +++ b/source/blender/blenkernel/intern/editmesh.cc @@ -187,6 +187,10 @@ Span BKE_editmesh_vert_coords_when_deformed( (editmesh_eval_final->runtime->wrapper_type == ME_WRAPPER_TYPE_BMESH)) { /* If this is an edit-mesh type, leave nullptr as we can use the vertex coords. */ + + /* If this is not empty, it's value should be assigned to `vert_positions` + * however the `mesh_cage` check above should handle this case. */ + BLI_assert(BKE_mesh_wrapper_vert_coords(mesh_cage).is_empty()); } else { /* Constructive modifiers have been used, we need to allocate coordinates. */ diff --git a/source/blender/blenkernel/intern/mesh_data_update.cc b/source/blender/blenkernel/intern/mesh_data_update.cc index 76732d60355..c911b055d84 100644 --- a/source/blender/blenkernel/intern/mesh_data_update.cc +++ b/source/blender/blenkernel/intern/mesh_data_update.cc @@ -858,6 +858,7 @@ static void editbmesh_calc_modifiers(Depsgraph &depsgraph, if (mesh_cage->runtime->edit_mesh) { mesh->runtime->edit_mesh = mesh_cage->runtime->edit_mesh; mesh->runtime->is_original_bmesh = true; + mesh->runtime->deformed_only = mesh_cage->runtime->deformed_only; if (mesh_cage->runtime->edit_data) { mesh->runtime->edit_data = std::make_unique( *mesh_cage->runtime->edit_data); diff --git a/source/blender/blenkernel/intern/mesh_wrapper.cc b/source/blender/blenkernel/intern/mesh_wrapper.cc index 8938f62701c..63875d99557 100644 --- a/source/blender/blenkernel/intern/mesh_wrapper.cc +++ b/source/blender/blenkernel/intern/mesh_wrapper.cc @@ -67,6 +67,9 @@ Mesh *BKE_mesh_wrapper_from_editmesh(std::shared_ptr em, /* Use edit-mesh directly where possible. */ mesh->runtime->is_original_bmesh = true; + /* Until the mesh is modified destructively it can be considered "deformed". */ + mesh->runtime->deformed_only = true; + mesh->runtime->edit_mesh = std::move(em); /* Make sure we crash if these are ever used. */