diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-19 22:11:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2008-12-19 22:11:02 +0300 |
commit | 3bda5490f7f50a795cd8b2c3d841c9375723aee9 (patch) | |
tree | cdcd6b5a08cc8566a0d3c8e8e1518fe990d5826f /source/blender/editors/util | |
parent | 12ad72ba8f4ab598c558428567707413e208eac7 (diff) |
2.5: globals cleanup
* G.version removed, use BLENDER_VERSION
* G.order removed, ENDIAN_ORDER
* G.vd, G.sipo, G.buts, G.sima, .. removed.
* G.qual removed
* G.simulf removed (was unused in 2.4x)
* error() and some other unused stubs removed
Diffstat (limited to 'source/blender/editors/util')
-rw-r--r-- | source/blender/editors/util/ed_markers.c | 4 | ||||
-rw-r--r-- | source/blender/editors/util/ed_util.c | 15 |
2 files changed, 7 insertions, 12 deletions
diff --git a/source/blender/editors/util/ed_markers.c b/source/blender/editors/util/ed_markers.c index 96f7f15f8c9..6c27219c9c7 100644 --- a/source/blender/editors/util/ed_markers.c +++ b/source/blender/editors/util/ed_markers.c @@ -394,9 +394,9 @@ static int ed_marker_move_modal(bContext *C, wmOperator *op, wmEvent *evt) fac= ((float)(evt->x - mm->firstx)*dx); if (ELEM(mm->slink->spacetype, SPACE_TIME, SPACE_SOUND)) - apply_keyb_grid(&fac, 0.0, FPS, 0.1*FPS, 0); + apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, FPS, 0.1*FPS, 0); else - apply_keyb_grid(&fac, 0.0, 1.0, 0.1, U.flag & USER_AUTOGRABGRID); + apply_keyb_grid(evt->shift, evt->ctrl, &fac, 0.0, 1.0, 0.1, U.flag & USER_AUTOGRABGRID); offs= (int)fac; RNA_int_set(op->ptr, "frs", offs); diff --git a/source/blender/editors/util/ed_util.c b/source/blender/editors/util/ed_util.c index 841c5cd3cb5..5113326cff1 100644 --- a/source/blender/editors/util/ed_util.c +++ b/source/blender/editors/util/ed_util.c @@ -47,19 +47,14 @@ /* now only used in 2d spaces, like time, ipo, nla, sima... */ -/* XXX clean G.qual */ -void apply_keyb_grid(float *val, float fac1, float fac2, float fac3, int invert) +/* XXX shift/ctrl not configurable */ +void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert) { /* fac1 is for 'nothing', fac2 for CTRL, fac3 for SHIFT */ - int ctrl; + if(invert) + ctrl= !ctrl; - if(invert) { - if(G.qual & LR_CTRLKEY) ctrl= 0; - else ctrl= 1; - } - else ctrl= (G.qual & LR_CTRLKEY); - - if(ctrl && (G.qual & LR_SHIFTKEY)) { + if(ctrl && shift) { if(fac3!= 0.0) *val= fac3*floor(*val/fac3 +.5); } else if(ctrl) { |