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/ed_util.c | |
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/ed_util.c')
-rw-r--r-- | source/blender/editors/util/ed_util.c | 15 |
1 files changed, 5 insertions, 10 deletions
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) { |