Fix for [#19780] pivot for rotation/scaling doesn't use "active vert/edge/face"
authorMatt Ebb <matt@mke3.net>
Thu, 5 Nov 2009 04:37:42 +0000 (04:37 +0000)
committerMatt Ebb <matt@mke3.net>
Thu, 5 Nov 2009 04:37:42 +0000 (04:37 +0000)
Martin please doublecheck, but it should be all good.

source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/transform/transform_generics.c

index 9b1b239be70a21c47e4dd03845df9bdf3d4ef203..82ea244284544d7df6deb78fc384a43ab714fe1b 100644 (file)
@@ -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;
                
index 17818713b1e7773a17dc3d983032931c3a443054..2e7cfd63836de7357a0dee59af5cd3637b4f117a 100644 (file)
@@ -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)