From 3bda5490f7f50a795cd8b2c3d841c9375723aee9 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 19 Dec 2008 19:11:02 +0000 Subject: 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 --- source/blender/editors/util/ed_util.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/util/ed_util.c') 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) { -- cgit v1.2.3