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:
authorCampbell Barton <ideasman42@gmail.com>2012-05-22 19:49:41 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-22 19:49:41 +0400
commitcdba862223230ed0fd69df333296b800e156e961 (patch)
treebcb893a720cbf89ff9af2a71a71832233f292044 /source/blender/bmesh/intern/bmesh_marking.c
parent6c67fc83ead6f54efb9d5a4c57e21362b6d888a2 (diff)
use faces longest edge when orienting the manipulator to the active face
also small speedup for finding the longest edge
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_marking.c')
-rw-r--r--source/blender/bmesh/intern/bmesh_marking.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c
index a69558eeeca..4e3f50b1106 100644
--- a/source/blender/bmesh/intern/bmesh_marking.c
+++ b/source/blender/bmesh/intern/bmesh_marking.c
@@ -691,21 +691,9 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3])
}
}
else {
- /* BMESH_TODO (not urgent, use longest ngon edge for alignment) */
+ BMLoop *l_long = BM_face_find_longest_loop(efa);
- /* start with v1-2 */
- sub_v3_v3v3(r_plane, verts[0]->co, verts[1]->co);
-
- /* test the edge between v2-3, use if longer */
- sub_v3_v3v3(vec, verts[1]->co, verts[2]->co);
- if (dot_v3v3(r_plane, r_plane) < dot_v3v3(vec, vec))
- copy_v3_v3(r_plane, vec);
-
- /* test the edge between v1-3, use if longer */
- sub_v3_v3v3(vec, verts[2]->co, verts[0]->co);
- if (dot_v3v3(r_plane, r_plane) < dot_v3v3(vec, vec)) {
- copy_v3_v3(r_plane, vec);
- }
+ sub_v3_v3v3(r_plane, l_long->v->co, l_long->next->v->co);
}
}