diff options
Diffstat (limited to 'source/blender/bmesh/tools/bmesh_decimate_collapse.c')
-rw-r--r-- | source/blender/bmesh/tools/bmesh_decimate_collapse.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c index e5dd6491076..c60dd04fbb5 100644 --- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c +++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c @@ -1257,10 +1257,12 @@ static bool bm_decim_edge_collapse( BM_ITER_ELEM (l, &liter, v_other, BM_LOOPS_OF_VERT) { if (l->f->len == 3) { BMEdge *e_outer; - if (BM_vert_in_edge(l->prev->e, l->v)) + if (BM_vert_in_edge(l->prev->e, l->v)) { e_outer = l->next->e; - else + } + else { e_outer = l->prev->e; + } BLI_assert(BM_vert_in_edge(e_outer, l->v) == false); @@ -1348,9 +1350,9 @@ void BM_mesh_decimate_collapse( #ifdef USE_CUSTOMDATA /* initialize customdata flag, we only need math for loops */ - if (CustomData_has_interp(&bm->vdata)) customdata_flag |= CD_DO_VERT; - if (CustomData_has_interp(&bm->edata)) customdata_flag |= CD_DO_EDGE; - if (CustomData_has_math(&bm->ldata)) customdata_flag |= CD_DO_LOOP; + if (CustomData_has_interp(&bm->vdata)) { customdata_flag |= CD_DO_VERT; } + if (CustomData_has_interp(&bm->edata)) { customdata_flag |= CD_DO_EDGE; } + if (CustomData_has_math(&bm->ldata)) { customdata_flag |= CD_DO_LOOP; } #endif /* iterative edge collapse and maintain the eheap */ |