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>2013-07-25 10:05:44 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-25 10:05:44 +0400
commit32700316600aad17ed5ae2620ed42d239e41e443 (patch)
treee9526c2e720cc7c6468a7c7117ef876391c04d0c /source/blender/bmesh/tools/bmesh_decimate_dissolve.c
parentec3fce8e27755410ff4881abd5b299c2c91a3673 (diff)
correct problem with limited-dissolve not leaving the selection correctly (caused by BM_elem_attrs_copy no longer dealing with selection)
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_decimate_dissolve.c')
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_dissolve.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
index 9d4e01d19cd..9f97d8f4287 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
@@ -72,7 +72,8 @@ static int dissolve_elem_cmp(const void *a1, const void *a2)
void BM_mesh_decimate_dissolve_ex(BMesh *bm, const float angle_limit, const bool do_dissolve_boundaries,
const BMO_Delimit delimit,
BMVert **vinput_arr, const int vinput_len,
- BMEdge **einput_arr, const int einput_len)
+ BMEdge **einput_arr, const int einput_len,
+ const short oflag_out)
{
const float angle_max = (float)M_PI / 2.0f;
DissolveElemWeight *weight_elems = MEM_mallocN(max_ii(einput_len, vinput_len) *
@@ -155,6 +156,9 @@ void BM_mesh_decimate_dissolve_ex(BMesh *bm, const float angle_limit, const bool
/* there may be some errors, we don't mind, just move on */
if (f_new) {
BM_face_normal_update(f_new);
+ if (oflag_out) {
+ BMO_elem_flag_enable(bm, f_new, oflag_out);
+ }
}
else {
BMO_error_clear(bm);
@@ -269,7 +273,8 @@ void BM_mesh_decimate_dissolve(BMesh *bm, const float angle_limit, const bool do
BM_mesh_decimate_dissolve_ex(bm, angle_limit, do_dissolve_boundaries,
delimit,
vinput_arr, vinput_len,
- einput_arr, einput_len);
+ einput_arr, einput_len,
+ 0);
MEM_freeN(vinput_arr);
MEM_freeN(einput_arr);