diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-23 05:50:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-23 05:53:42 +0300 |
commit | dbdf653f8e477f8b23185b236667c774549a0f93 (patch) | |
tree | f2f35a2995685ae316c6a6ddc7d3e7d39ad0292d /source/blender/modifiers/intern | |
parent | e3013fdc3b9bb9747ffd44a08d5afe16617816c2 (diff) |
Fix bad origindex layers for editmode modifiers
Reverts workaround from last commit.
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_bevel.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_decimate.c | 9 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_edgesplit.c | 1 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_triangulate.c | 9 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_wireframe.c | 1 |
5 files changed, 15 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index c071559bffe..8424df8a7bc 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -377,6 +377,7 @@ static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mes .add_key_index = false, .use_shapekey = true, .active_shapekey = ctx->object->shapenr, + .cd_mask_extra = CD_MASK_ORIGINDEX, }); if ((bmd->lim_flags & MOD_BEVEL_VGROUP) && bmd->defgrp_name[0]) diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index 7af25a048f8..958b814c970 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -152,9 +152,12 @@ static Mesh *applyModifier( } bm = BKE_mesh_to_bmesh_ex( - mesh, - &((struct BMeshCreateParams){0}), - &((struct BMeshFromMeshParams){.calc_face_normal = calc_face_normal,})); + mesh, + &(struct BMeshCreateParams){0}, + &(struct BMeshFromMeshParams){ + .calc_face_normal = calc_face_normal, + .cd_mask_extra = CD_MASK_ORIGINDEX, + }); switch (dmd->mode) { case MOD_DECIM_MODE_COLLAPSE: diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 58cbbbc7b4d..3b7e1f84ef3 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -69,6 +69,7 @@ static Mesh *doEdgeSplit(Mesh *mesh, EdgeSplitModifierData *emd, const ModifierE .add_key_index = false, .use_shapekey = true, .active_shapekey = ctx->object->shapenr, + .cd_mask_extra = CD_MASK_ORIGINDEX, }); if (emd->flags & MOD_EDGESPLIT_FROMANGLE) { diff --git a/source/blender/modifiers/intern/MOD_triangulate.c b/source/blender/modifiers/intern/MOD_triangulate.c index 6c38d208c02..1247c59b3f9 100644 --- a/source/blender/modifiers/intern/MOD_triangulate.c +++ b/source/blender/modifiers/intern/MOD_triangulate.c @@ -47,9 +47,12 @@ static Mesh *triangulate_mesh(Mesh *mesh, const int quad_method, const int ngon_ MEdge *me; bm = BKE_mesh_to_bmesh_ex( - mesh, - &((struct BMeshCreateParams){0}), - &((struct BMeshFromMeshParams){.calc_face_normal = true,})); + mesh, + &((struct BMeshCreateParams){0}), + &((struct BMeshFromMeshParams){ + .calc_face_normal = true, + .cd_mask_extra = CD_MASK_ORIGINDEX, + })); BM_mesh_triangulate(bm, quad_method, ngon_method, false, NULL, NULL, NULL); diff --git a/source/blender/modifiers/intern/MOD_wireframe.c b/source/blender/modifiers/intern/MOD_wireframe.c index 15e26fb5c2e..05fc589a5ad 100644 --- a/source/blender/modifiers/intern/MOD_wireframe.c +++ b/source/blender/modifiers/intern/MOD_wireframe.c @@ -76,6 +76,7 @@ static Mesh *WireframeModifier_do(WireframeModifierData *wmd, Object *ob, Mesh * .add_key_index = false, .use_shapekey = true, .active_shapekey = ob->shapenr, + .cd_mask_extra = CD_MASK_ORIGINDEX, }); BM_mesh_wireframe( |