[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48408] trunk/blender/source/blender/ editors/mesh/editmesh_loopcut.c: Fix [#31939] Loop cutting a self intersecting face loop

Bastien Montagne montagne29 at wanadoo.fr
Fri Jun 29 15:55:37 CEST 2012


Revision: 48408
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48408
Author:   mont29
Date:     2012-06-29 13:55:25 +0000 (Fri, 29 Jun 2012)
Log Message:
-----------
Fix [#31939] Loop cutting a self intersecting face loop

Enabled use_gridfill for edgesubdivide called by loopcut. This will break edgeslide in this specific case (intersecting faceloop), but imho makes more sense this way than the other. Very easy to revert anyway, and this should only affect this specific cornercase.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c

Modified: trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c	2012-06-29 13:11:44 UTC (rev 48407)
+++ trunk/blender/source/blender/editors/mesh/editmesh_loopcut.c	2012-06-29 13:55:25 UTC (rev 48408)
@@ -313,10 +313,13 @@
 		edgering_sel(lcd, cuts, 1);
 		
 		if (lcd->do_cut) {
+			/* Enable gridfill, so that intersecting loopcut works as one would expect.
+			 * Note though that it will break edgeslide in this specific case.
+			 * See [#31939]. */
 			BM_mesh_esubdivide(em->bm, BM_ELEM_SELECT,
 			                   0.0f, 0.0f, 0.0f,
 			                   cuts,
-			                   SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, FALSE, 0);
+			                   SUBDIV_SELECT_LOOPCUT, SUBD_PATH, 0, TRUE, 0);
 
 			/* force edge slide to edge select mode in in face select mode */
 			if (em->selectmode & SCE_SELECT_FACE) {
@@ -336,7 +339,8 @@
 			DAG_id_tag_update(lcd->ob->data, 0);
 		}
 		else {
-			
+			/* XXX Is this piece of code ever used now? Simple loop select is now
+			 *     in editmesh_select.c (around line 1000)... */
 			/* sets as active, useful for other tools */
 			if (em->selectmode & SCE_SELECT_VERTEX)
 				BM_select_history_store(em->bm, lcd->eed->v1);  /* low priority TODO, get vertrex close to mouse */




More information about the Bf-blender-cvs mailing list