Usability todo:
authorTon Roosendaal <ton@blender.org>
Mon, 31 Dec 2012 12:26:14 +0000 (12:26 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 31 Dec 2012 12:26:14 +0000 (12:26 +0000)
Editmode "Shear" didn't communicate well.
- Added X and Y shortcut to set shear axis
- Added print in header to denote that.

It will still switch with MMB press too.

source/blender/editors/transform/transform.c

index f861d41..39bad76 100644 (file)
@@ -2721,6 +2721,18 @@ int handleEventShear(TransInfo *t, wmEvent *event)
 
                status = 1;
        }
+       else if (event->type == XKEY && event->val == KM_PRESS) {
+               initMouseInputMode(t, &t->mouse, INPUT_HORIZONTAL_ABSOLUTE);
+               t->customData = NULL;
+               
+               status = 1;
+       }
+       else if (event->type == YKEY && event->val == KM_PRESS) {
+               initMouseInputMode(t, &t->mouse, INPUT_VERTICAL_ABSOLUTE);
+               t->customData = (void *)1;
+               
+               status = 1;
+       }
        
        return status;
 }
@@ -2754,7 +2766,7 @@ int Shear(TransInfo *t, const int UNUSED(mval[2]))
        }
        else {
                /* default header print */
-               sprintf(str, "Shear: %.3f %s", value, t->proptext);
+               sprintf(str, "Shear: %.3f %s (Press X or Y to set shear axis)", value, t->proptext);
        }
        
        t->values[0] = value;