Fix modifier cage option being overwritten
authorCampbell Barton <ideasman42@gmail.com>
Wed, 10 Oct 2018 04:18:34 +0000 (15:18 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 10 Oct 2018 04:22:47 +0000 (15:22 +1100)
Editmesh modifier calculation behaved as if eModifierMode_OnCage
was enabled for all modifiers.

Remove assignment after all modifiers are calculated.

source/blender/blenkernel/intern/DerivedMesh.c

index 21eff8d39ee83d4a6ade202b57332d0864c63322..e04a5bcf0a3f6aa774989daea2aaa7ba08c6181f 100644 (file)
@@ -2128,13 +2128,6 @@ static void editbmesh_calc_modifiers(
        }
        else {
                /* this is just a copy of the editmesh, no need to calc normals */
-               Mesh *me_orig = ob->data;
-               if (me_orig->id.tag & LIB_TAG_COPIED_ON_WRITE) {
-                       BKE_mesh_runtime_ensure_edit_data(me_orig);
-                       if (me_orig->runtime.edit_data->vertexCos != NULL)
-                               MEM_freeN((void *)me_orig->runtime.edit_data->vertexCos);
-                       me_orig->runtime.edit_data->vertexCos = MEM_dupallocN(deformedVerts);
-               }
                *r_final = BKE_mesh_from_editmesh_with_coords_thin_wrap(em, dataMask, deformedVerts);
                deformedVerts = NULL;