Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2019-06-17 09:58:39 +0300
committerYimingWu <xp8110@outlook.com>2019-06-17 09:58:39 +0300
commit915a928067a89923fab144ca4a7ca2e75337a5e8 (patch)
treec0c1dae1f4f39c1e2a5d451f2c8e9fc5cd726319 /source/blender/editors/mesh/editmesh_tools.c
parentfe71389950aa611aac12cc88bdc965363dbcdc7d (diff)
parent5364e62b0535cdadbd1db27dc1633cfd253a49ef (diff)
Merge branch 'master' into soc-2019-npr
Diffstat (limited to 'source/blender/editors/mesh/editmesh_tools.c')
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 97bdb3a7a5d..60de26e6ddc 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -7690,7 +7690,7 @@ static int point_normals_init(bContext *C, wmOperator *op, const wmEvent *UNUSED
BKE_editmesh_ensure_autosmooth(em);
BKE_editmesh_lnorspace_update(em);
- BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm);
+ BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm, false);
op->customdata = lnors_ed_arr;
@@ -8247,7 +8247,10 @@ static int normals_split_merge(bContext *C, const bool do_merge)
BKE_editmesh_ensure_autosmooth(em);
BKE_editmesh_lnorspace_update(em);
- BMLoopNorEditDataArray *lnors_ed_arr = do_merge ? BM_loop_normal_editdata_array_init(bm) : NULL;
+ /* Note that we need temp lnor editing data for all loops of all affected vertices, since by
+ * setting some faces/edges as smooth we are going to change clnors spaces... See also T65809. */
+ BMLoopNorEditDataArray *lnors_ed_arr = do_merge ? BM_loop_normal_editdata_array_init(bm, true) :
+ NULL;
mesh_set_smooth_faces(em, do_merge);
@@ -8574,7 +8577,7 @@ static int edbm_normals_tools_exec(bContext *C, wmOperator *op)
BKE_editmesh_ensure_autosmooth(em);
BKE_editmesh_lnorspace_update(em);
- BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm);
+ BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm, false);
BMLoopNorEditData *lnor_ed = lnors_ed_arr->lnor_editdata;
float *normal_vector = scene->toolsettings->normal_vector;
@@ -8868,7 +8871,7 @@ static int edbm_smoothen_normals_exec(bContext *C, wmOperator *op)
BKE_editmesh_ensure_autosmooth(em);
BKE_editmesh_lnorspace_update(em);
- BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm);
+ BMLoopNorEditDataArray *lnors_ed_arr = BM_loop_normal_editdata_array_init(bm, false);
float(*smooth_normal)[3] = MEM_callocN(sizeof(*smooth_normal) * lnors_ed_arr->totloop, __func__);