diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-06-01 01:23:57 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-06-01 01:23:57 +0400 |
commit | 74903b77f48c9c2ec9c226fc6ae34381d258e47e (patch) | |
tree | 68a80df8e2f393411a5e0f10ca50fa707246b14f /source/blender/src/drawview.c | |
parent | f1d54f892b7480b746b6423d4388455fe7ede2b9 (diff) |
Merging revisions 15020-15073 of https://svn.blender.org/svnroot/bf-blender/trunk/blendercloth
Diffstat (limited to 'source/blender/src/drawview.c')
-rw-r--r-- | source/blender/src/drawview.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c index 52e0d3d6f05..e83ecb13960 100644 --- a/source/blender/src/drawview.c +++ b/source/blender/src/drawview.c @@ -3732,18 +3732,22 @@ int play_anim(int mode) else viewmove(0); } } else if (event==WHEELDOWNMOUSE || (val && event==PADMINUS)) { /* copied from persptoetsen */ - /* this min and max is also in viewmove() */ - if(G.vd->persp==V3D_CAMOB) { - G.vd->camzoom-= 10; - if(G.vd->camzoom<-30) G.vd->camzoom= -30; + if (G.vd) { /* when using the sequencer this can be NULL */ + /* this min and max is also in viewmove() */ + if(G.vd->persp==V3D_CAMOB) { + G.vd->camzoom-= 10; + if(G.vd->camzoom<-30) G.vd->camzoom= -30; + } + else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f; } - else if(G.vd->dist<10.0*G.vd->far) G.vd->dist*=1.2f; } else if (event==WHEELUPMOUSE || (val && event==PADPLUSKEY)) { /* copied from persptoetsen */ - if(G.vd->persp==V3D_CAMOB) { - G.vd->camzoom+= 10; - if(G.vd->camzoom>300) G.vd->camzoom= 300; + if (G.vd) { + if(G.vd->persp==V3D_CAMOB) { + G.vd->camzoom+= 10; + if(G.vd->camzoom>300) G.vd->camzoom= 300; + } + else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f; } - else if(G.vd->dist> 0.001*G.vd->grid) G.vd->dist*=.83333f; } else if(event==MKEY) { if(val) add_marker(CFRA-1); } |