diff options
author | Matt Ebb <matt@mke3.net> | 2009-11-05 07:37:42 +0300 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2009-11-05 07:37:42 +0300 |
commit | ce973efd4f7c4ff85b1ff434154fde8ddf89530c (patch) | |
tree | 54fb88f8ee35e4f26deefb3eb1b40e42db03ad14 | |
parent | 539a68f6c035d521b7c8a1eb7a15de664798cf69 (diff) |
Fix for [#19780] pivot for rotation/scaling doesn't use "active vert/edge/face"
Martin please doublecheck, but it should be all good.
-rw-r--r-- | source/blender/editors/space_view3d/view3d_header.c | 1 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_generics.c | 17 |
2 files changed, 11 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 9b1b239be70..82ea2442845 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -1778,6 +1778,7 @@ static void do_view3d_header_buttons(bContext *C, void *arg, int event) WM_operator_properties_free(&props_ptr); break; case B_AROUND: + WM_event_add_notifier(C, NC_SPACE|ND_SPACE_VIEW3D, obedit->data); // XXX handle_view3d_around(); /* copies to other 3d windows */ break; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 17818713b1e..2e7cfd63836 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1307,16 +1307,19 @@ void calculateCenter(TransInfo *t) case V3D_ACTIVE: { /* set median, and if if if... do object center */ -#if 0 // TRANSFORM_FIX_ME - EditSelection ese; + /* EDIT MODE ACTIVE EDITMODE ELEMENT */ - if (t->obedit && t->obedit->type == OB_MESH && EM_get_actSelection(&ese)) { - EM_editselection_center(t->center, &ese); - calculateCenter2D(t); - break; + if (t->obedit && t->obedit->type == OB_MESH) { + EditSelection ese; + EditMesh *em = BKE_mesh_get_editmesh(t->obedit->data); + + if (EM_get_actSelection(em, &ese)) { + EM_editselection_center(t->center, &ese); + calculateCenter2D(t); + break; + } } /* END EDIT MODE ACTIVE ELEMENT */ -#endif calculateCenterMedian(t); if((t->flag & (T_EDIT|T_POSE))==0) |