diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-26 10:59:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-11-26 10:59:59 +0400 |
commit | cf2c459325a31b4a40f7abb24dc16c67016d75ad (patch) | |
tree | 11005f13d592ca77a93986c16ad82b7081da2460 /source/blender/editors | |
parent | 7ecf0542956523391ea94084664fdf5c8365aa3b (diff) |
Fix #33285: loop cut is not supposed to cut through triangles/ngons, but it
still happened when the loop would go all the way around the mesh with just one
triangle/ngon inbetween to close the loop.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 12 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_tools.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index fcfb12a09bf..3920d684243 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -261,7 +261,11 @@ static void edgering_sel(RingSelOpData *lcd, int previewlines, int select) lasteed = eed; } +#ifdef BMW_EDGERING_NGON if (lasteed != startedge && BM_edge_share_face_check(lasteed, startedge)) { +#else + if (lasteed != startedge && BM_edge_share_quad_check(lasteed, startedge)) { +#endif v[1][0] = v[0][0]; v[1][1] = v[0][1]; @@ -309,6 +313,11 @@ static void ringsel_finish(bContext *C, wmOperator *op) RingSelOpData *lcd = op->customdata; const int cuts = RNA_int_get(op->ptr, "number_cuts"); const float smoothness = 0.292f * RNA_float_get(op->ptr, "smoothness"); +#ifdef BMW_EDGERING_NGON + const int use_onlyquads = FALSE; +#else + const int use_onlyquads = TRUE; +#endif if (lcd->eed) { BMEditMesh *em = lcd->em; @@ -322,7 +331,8 @@ static void ringsel_finish(bContext *C, wmOperator *op) BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT, smoothness, 0.0f, 0.0f, cuts, - SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, TRUE, 0); + SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, TRUE, + use_onlyquads, 0); /* force edge slide to edge select mode in in face select mode */ if (em->selectmode & SCE_SELECT_FACE) { diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c index e6bd0b4a12b..335f2a8c829 100644 --- a/source/blender/editors/mesh/editmesh_tools.c +++ b/source/blender/editors/mesh/editmesh_tools.c @@ -109,7 +109,7 @@ static int edbm_subdivide_exec(bContext *C, wmOperator *op) smooth, fractal, along_normal, cuts, SUBDIV_SELECT_ORIG, RNA_enum_get(op->ptr, "quadcorner"), - RNA_boolean_get(op->ptr, "quadtri"), TRUE, + RNA_boolean_get(op->ptr, "quadtri"), TRUE, FALSE, RNA_int_get(op->ptr, "seed")); EDBM_update_generic(C, em, TRUE); |