diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-14 13:39:52 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-14 13:39:52 +0300 |
commit | 4bf751be7012827758b5b2ae844e370028921bd2 (patch) | |
tree | 40102707050faa5742a7e435a7f3d68804fa53a1 /source/blender/modifiers/intern | |
parent | a671aa922a1591128f0a1478c29af39ff6eca61f (diff) | |
parent | 66407e15cb5136bdbed45b9e0576b1e9863c3f4f (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/modifiers/intern/MOD_normal_edit.c
source/blender/windowmanager/intern/wm_files.c
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_normal_edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index 08dbcf81256..935d99e4a21 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -201,6 +201,7 @@ static void normalEditModifier_do_radial( MVert *mvert, const int num_verts, MEdge *medge, const int num_edges, MLoop *mloop, const int num_loops, MPoly *mpoly, const int num_polys) { + const bool do_polynors_fix = (enmd->flag & MOD_NORMALEDIT_NO_POLYNORS_FIX) == 0; int i; float (*cos)[3] = MEM_malloc_arrayN((size_t)num_verts, sizeof(*cos), __func__); @@ -278,7 +279,7 @@ static void normalEditModifier_do_radial( mix_limit, mix_mode, num_verts, mloop, loopnors, nos, num_loops); } - if (polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) { + if (do_polynors_fix && polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) { /* XXX TODO is this still needed? */ // mesh->dirty |= DM_DIRTY_TESS_CDLAYERS; /* We need to recompute vertex normals! */ @@ -301,6 +302,7 @@ static void normalEditModifier_do_directional( MVert *mvert, const int num_verts, MEdge *medge, const int num_edges, MLoop *mloop, const int num_loops, MPoly *mpoly, const int num_polys) { + const bool do_polynors_fix = (enmd->flag & MOD_NORMALEDIT_NO_POLYNORS_FIX) == 0; const bool use_parallel_normals = (enmd->flag & MOD_NORMALEDIT_USE_DIRECTION_PARALLEL) != 0; float (*nos)[3] = MEM_malloc_arrayN((size_t)num_loops, sizeof(*nos), __func__); @@ -357,7 +359,7 @@ static void normalEditModifier_do_directional( mix_limit, mix_mode, num_verts, mloop, loopnors, nos, num_loops); } - if (polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) { + if (do_polynors_fix && polygons_check_flip(mloop, nos, &mesh->ldata, mpoly, polynors, num_polys)) { mesh->runtime.cd_dirty_vert |= CD_MASK_NORMAL; } |