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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-26 10:59:59 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-26 10:59:59 +0400
commitcf2c459325a31b4a40f7abb24dc16c67016d75ad (patch)
tree11005f13d592ca77a93986c16ad82b7081da2460 /source/blender/editors/mesh
parent7ecf0542956523391ea94084664fdf5c8365aa3b (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/mesh')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c12
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c2
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);