Bugfix: [#20403] transform manipulation widgets with normal coordinates
authorMartin Poirier <theeth@yahoo.com>
Thu, 17 Dec 2009 17:50:55 +0000 (17:50 +0000)
committerMartin Poirier <theeth@yahoo.com>
Thu, 17 Dec 2009 17:50:55 +0000 (17:50 +0000)
Disable manipulator drawing during transform

source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c

index 3b1ead32fadf1e9cf56c6ea99ca2be0c0359dbb7..b7e1b2e499639947388af6260a9f8ca1104dba92 100644 (file)
@@ -302,9 +302,10 @@ typedef struct TransInfo {
        void      (*customFree)(struct TransInfo *); /* if a special free function is needed */
 
        /*************** NEW STUFF *********************/
-       short           launch_event; /* event type used to launch transform */
+       short           launch_event;   /* event type used to launch transform */
 
        short           current_orientation;
+       short           twtype;                 /* backup from view3d, to restore on end */
 
        short           prop_mode;
        
index 0115d34c6b1d6ec7eb0e3656911885aae55abd8c..98c1b333844bc9eec8c83c4cf6d1434795e7db49 100644 (file)
@@ -5006,6 +5006,17 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
 
        clear_trans_object_base_flags(t);
 
+       if(t->spacetype == SPACE_VIEW3D)
+       {
+               View3D *v3d = t->view;
+
+               /* restore manipulator */
+               if (t->flag & T_MODAL) {
+                       v3d->twtype = t->twtype;
+               }
+       }
+
+
 #if 0 // TRANSFORM_FIX_ME
        if(resetslowpar)
                reset_slowparents();
index f2c4da0da27bd72565c7b48786acff81ecd8cc56..061b2adbd793e229b52621c588a356cea1d8f1b5 100644 (file)
@@ -927,6 +927,12 @@ int initTransInfo (bContext *C, TransInfo *t, wmOperator *op, wmEvent *event)
                t->view = v3d;
                t->animtimer= CTX_wm_screen(C)->animtimer;
                
+               /* turn manipulator off during transform */
+               if (t->flag & T_MODAL) {
+                       t->twtype = v3d->twtype;
+                       v3d->twtype = 0;
+               }
+
                if(v3d->flag & V3D_ALIGN) t->flag |= T_V3D_ALIGN;
                t->around = v3d->around;