diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-07-05 09:52:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-07-05 09:52:49 +0400 |
commit | 02002c23947f901bd7648dba1c9d50906b5a9be9 (patch) | |
tree | 088e15472a67279b4206096d02b6582721d720f5 /source/blender/bmesh | |
parent | a02d256f5effdeec890cd90d96b6132845daf3ce (diff) |
fix [#36014] Individual Origin Translation across Normal Orientation doesn't work properly.
makes boundary edges use predictable orientation.
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_marking.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/source/blender/bmesh/intern/bmesh_marking.c b/source/blender/bmesh/intern/bmesh_marking.c index dc7c13b3fe0..61a326bbf97 100644 --- a/source/blender/bmesh/intern/bmesh_marking.c +++ b/source/blender/bmesh/intern/bmesh_marking.c @@ -721,17 +721,23 @@ void BM_editselection_plane(BMEditSelection *ese, float r_plane[3]) 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) { |