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:
authorCampbell Barton <ideasman42@gmail.com>2015-05-16 03:18:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-05-16 03:18:38 +0300
commit05c4c2409ea4618704df28258866e39a8a53b3cb (patch)
tree580691568f8bdc4d2d8065846f73bd588364cecc /source/blender/bmesh/tools/bmesh_decimate_dissolve.c
parent5cc55486eee7ab5131750fae4a93b1472d1d5688 (diff)
BMesh: add sharp edge delimiter
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_decimate_dissolve.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_dissolve.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
index 6d3b738a462..8a14291d3bc 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
@@ -74,6 +74,12 @@ static float bm_edge_calc_dissolve_error(const BMEdge *e, const BMO_Delimit deli
goto fail;
}
+ if ((delimit & BMO_DELIM_SHARP) &&
+ (BM_elem_flag_test(e, BM_ELEM_SMOOTH) == 0))
+ {
+ goto fail;
+ }
+
if ((delimit & BMO_DELIM_MATERIAL) &&
(e->l->f->mat_nr != e->l->radial_next->f->mat_nr))
{