Commit: 4b2b8a0c3fdcd190cf91b304239a73e4c4fca80c
Author: Campbell Barton
Date:   Wed Oct 24 14:45:36 2018 +1100
Branches: blender2.8
https://developer.blender.org/rB4b2b8a0c3fdcd190cf91b304239a73e4c4fca80c

Fix T57351: Deform modifiers skipped in editmode

===================================================================

M       source/blender/bmesh/intern/bmesh_mesh_conv.c

===================================================================

diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c 
b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index ef5864ba220..9f1b032ea0b 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -985,6 +985,14 @@ void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const 
int64_t cd_mask_extra)
        CustomData_add_layer(&me->ldata, CD_MLOOP, CD_CALLOC, NULL, 
bm->totloop);
        CustomData_add_layer(&me->pdata, CD_MPOLY, CD_CALLOC, NULL, 
bm->totface);
 
+       /* don't process shapekeys, we only feed them through the modifier 
stack as needed,
+        * e.g. for applying modifiers or the like*/
+       const CustomDataMask mask = (CD_MASK_DERIVEDMESH | cd_mask_extra) & 
~CD_MASK_SHAPEKEY;
+       CustomData_merge(&bm->vdata, &me->vdata, mask, CD_CALLOC, me->totvert);
+       CustomData_merge(&bm->edata, &me->edata, mask, CD_CALLOC, me->totedge);
+       CustomData_merge(&bm->ldata, &me->ldata, mask, CD_CALLOC, me->totloop);
+       CustomData_merge(&bm->pdata, &me->pdata, mask, CD_CALLOC, me->totpoly);
+
        BKE_mesh_update_customdata_pointers(me, false);
 
        BMIter iter;
@@ -1007,14 +1015,6 @@ void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, 
const int64_t cd_mask_extra)
        /* don't add origindex layer if one already exists */
        add_orig = !CustomData_has_layer(&bm->pdata, CD_ORIGINDEX);
 
-       /* don't process shapekeys, we only feed them through the modifier 
stack as needed,
-        * e.g. for applying modifiers or the like*/
-       const CustomDataMask mask = (CD_MASK_DERIVEDMESH | cd_mask_extra) & 
~CD_MASK_SHAPEKEY;
-       CustomData_merge(&bm->vdata, &me->vdata, mask, CD_CALLOC, me->totvert);
-       CustomData_merge(&bm->edata, &me->edata, mask, CD_CALLOC, me->totedge);
-       CustomData_merge(&bm->ldata, &me->ldata, mask, CD_CALLOC, me->totloop);
-       CustomData_merge(&bm->pdata, &me->pdata, mask, CD_CALLOC, me->totpoly);
-
        index = CustomData_get_layer(&me->vdata, CD_ORIGINDEX);
 
        BM_ITER_MESH_INDEX (eve, &iter, bm, BM_VERTS_OF_MESH, i) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to