[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58015] trunk/blender/source/blender/bmesh /intern/bmesh_marking.c: fix [#36014] Individual Origin Translation across Normal Orientation doesn' t work properly.

Campbell Barton ideasman42 at gmail.com
Fri Jul 5 07:52:49 CEST 2013


Revision: 58015
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58015
Author:   campbellbarton
Date:     2013-07-05 05:52:49 +0000 (Fri, 05 Jul 2013)
Log Message:
-----------
fix [#36014] Individual Origin Translation across Normal Orientation doesn't work properly.
makes boundary edges use predictable orientation.

Modified Paths:
--------------
    trunk/blender/source/blender/bmesh/intern/bmesh_marking.c

Modified: trunk/blender/source/blender/bmesh/intern/bmesh_marking.c
===================================================================
--- trunk/blender/source/blender/bmesh/intern/bmesh_marking.c	2013-07-05 00:30:00 UTC (rev 58014)
+++ trunk/blender/source/blender/bmesh/intern/bmesh_marking.c	2013-07-05 05:52:49 UTC (rev 58015)
@@ -721,17 +721,23 @@
 	else if (ese->htype == BM_EDGE) {
 		BMEdge *eed = (BMEdge *)ese->ele;
 
-		/* the plane is simple, it runs along the edge
-		 * however selecting different edges can swap the direction of the y axis.
-		 * this makes it less likely for the y axis of the manipulator
-		 * (running along the edge).. to flip less often.
-		 * at least its more predictable */
-		if (eed->v2->co[1] > eed->v1->co[1]) {  /* check which to do first */
-			sub_v3_v3v3(r_plane, eed->v2->co, eed->v1->co);
+		if (BM_edge_is_boundary(eed)) {
+			sub_v3_v3v3(r_plane, eed->l->v->co, eed->l->next->v->co);
 		}
 		else {
-			sub_v3_v3v3(r_plane, eed->v1->co, eed->v2->co);
+			/* the plane is simple, it runs along the edge
+			 * however selecting different edges can swap the direction of the y axis.
+			 * this makes it less likely for the y axis of the manipulator
+			 * (running along the edge).. to flip less often.
+			 * at least its more predictable */
+			if (eed->v2->co[1] > eed->v1->co[1]) {  /* check which to do first */
+				sub_v3_v3v3(r_plane, eed->v2->co, eed->v1->co);
+			}
+			else {
+				sub_v3_v3v3(r_plane, eed->v1->co, eed->v2->co);
+			}
 		}
+
 		normalize_v3(r_plane);
 	}
 	else if (ese->htype == BM_FACE) {




More information about the Bf-blender-cvs mailing list