diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-22 01:20:49 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-22 01:20:49 +0300 |
commit | 52858b7e66000b2784f6ff92d6e3d90d1038c8b9 (patch) | |
tree | 2455fb897c3694640b8284cbd2fa64cd72ce8c96 /source/blender/editors/transform/transform_numinput.c | |
parent | b400703403dd87c482824a1b10f40923c67412e4 (diff) |
[#20700] Transformation Increments
Patch by Jonathan Smith
When using numerical input, up and down arrow keys increment and decrement the value by the transform increment amount (grid for grab and so on).
Diffstat (limited to 'source/blender/editors/transform/transform_numinput.c')
-rw-r--r-- | source/blender/editors/transform/transform_numinput.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_numinput.c b/source/blender/editors/transform/transform_numinput.c index f5f1d5fac9e..e1e86af8a12 100644 --- a/source/blender/editors/transform/transform_numinput.c +++ b/source/blender/editors/transform/transform_numinput.c @@ -22,7 +22,7 @@ * * The Original Code is: all of this file. * - * Contributor(s): none yet. + * Contributor(s): Jonathan Smith * * ***** END GPL LICENSE BLOCK ***** */ @@ -159,12 +159,18 @@ void applyNumInput(NumInput *n, float *vec) } } -char handleNumInput(NumInput *n, wmEvent *event) +char handleNumInput(NumInput *n, wmEvent *event, float increment) { float Val = 0; short idx = n->idx, idx_max = n->idx_max; switch (event->type) { + case DOWNARROWKEY: /* Increments down*/ + n->val[idx] -= increment; + break; + case UPARROWKEY: /* Increments up*/ + n->val[idx] += increment; + break; case BACKSPACEKEY: if (n->ctrl[idx] == 0) { n->val[0] = |