diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-05-11 23:58:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-05-11 23:58:46 +0400 |
commit | e459d5518ec2ac19e22e480e685ca8c1fbd318f8 (patch) | |
tree | da06bdb518a368fed8440314162a09be310ced99 /source/blender/src/edit.c | |
parent | 96486b356f7d035a7abc835adbef850c3f314264 (diff) |
transform manipulator didnt follow the active face in some cases, also rotate about active mixed with normal did not work as it did in 2.45, where the active edge could be used
as a rotation
axis (this is quite useful)
Diffstat (limited to 'source/blender/src/edit.c')
-rw-r--r-- | source/blender/src/edit.c | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 656ecda8eac..a44bbc3af0f 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -1530,35 +1530,11 @@ void snap_curs_to_active() if (G.obedit->type == OB_MESH) { /* check active */ - if (G.editMesh->selected.last) { - EditSelection *ese = G.editMesh->selected.last; - if ( ese->type == EDITVERT ) { - EditVert *eve = (EditVert *)ese->data; - VECCOPY(curs, eve->co); - } - else if ( ese->type == EDITEDGE ) { - EditEdge *eed = (EditEdge *)ese->data; - VecAddf(curs, eed->v1->co, eed->v2->co); - VecMulf(curs, 0.5f); - } - else if ( ese->type == EDITFACE ) { - EditFace *efa = (EditFace *)ese->data; - - if (efa->v4) - { - VecAddf(curs, efa->v1->co, efa->v2->co); - VecAddf(curs, curs, efa->v3->co); - VecAddf(curs, curs, efa->v4->co); - VecMulf(curs, 0.25f); - } - else - { - VecAddf(curs, efa->v1->co, efa->v2->co); - VecAddf(curs, curs, efa->v3->co); - VecMulf(curs, 1/3.0f); - } - } + EditSelection ese; + if (EM_get_actSelection(&ese)) { + EM_editselection_center(curs, &ese); } + Mat4MulVecfl(G.obedit->obmat, curs); } } |