[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51291] trunk/blender/source/blender/ editors/mesh/editmesh_rip.c: improve edge rip when the edge has only 2 other connected edges.

Campbell Barton ideasman42 at gmail.com
Sat Oct 13 05:59:12 CEST 2012


Revision: 51291
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51291
Author:   campbellbarton
Date:     2012-10-13 03:59:06 +0000 (Sat, 13 Oct 2012)
Log Message:
-----------
improve edge rip when the edge has only 2 other connected edges.

common case ripping an edge of the default cube, it didn't run the edge size check.

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

Modified: trunk/blender/source/blender/editors/mesh/editmesh_rip.c
===================================================================
--- trunk/blender/source/blender/editors/mesh/editmesh_rip.c	2012-10-13 03:54:27 UTC (rev 51290)
+++ trunk/blender/source/blender/editors/mesh/editmesh_rip.c	2012-10-13 03:59:06 UTC (rev 51291)
@@ -745,7 +745,10 @@
 
 		/* single edge, extend */
 		if (i == 1 && e2->l) {
-			if ((totedge_manifold == 4) || (all_manifold == FALSE)) {
+			/* note: if the case of 3 edges has one change in loop stepping,
+			 * if this becomes more involved we may be better off splitting
+			 * the 3 edge case into its own else-if branch */
+			if ((totedge_manifold == 4 || totedge_manifold == 3) || (all_manifold == FALSE)) {
 				BMLoop *l_a = e2->l;
 				BMLoop *l_b = l_a->radial_next;
 
@@ -759,8 +762,10 @@
 				 * not crashing but adds duplicate edge. */
 				if (BM_edge_is_manifold(l->e)) {
 					l = l->radial_next;
-					l = BM_face_other_edge_loop(l->f, l->e, v);
 
+					if (totedge_manifold != 3)
+						l = BM_face_other_edge_loop(l->f, l->e, v);
+
 					if (l) {
 						BM_elem_flag_enable(l->e, BM_ELEM_TAG);
 					}




More information about the Bf-blender-cvs mailing list