[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14593] branches/apricot/source/blender: make translate view zoom use grid size
Campbell Barton
ideasman42 at gmail.com
Mon Apr 28 14:22:29 CEST 2008
Revision: 14593
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14593
Author: campbellbarton
Date: 2008-04-28 14:22:28 +0200 (Mon, 28 Apr 2008)
Log Message:
-----------
make translate view zoom use grid size
Modified Paths:
--------------
branches/apricot/source/blender/blenlib/intern/bpath.c
branches/apricot/source/blender/src/view.c
Modified: branches/apricot/source/blender/blenlib/intern/bpath.c
===================================================================
--- branches/apricot/source/blender/blenlib/intern/bpath.c 2008-04-28 12:14:30 UTC (rev 14592)
+++ branches/apricot/source/blender/blenlib/intern/bpath.c 2008-04-28 12:22:28 UTC (rev 14593)
@@ -239,8 +239,10 @@
return seq;
} else {
/* keep looking through the next scene, reallocate seq array */
- MEM_freeN((void *)bpi->seqdata.seqar);
- bpi->seqdata.seqar = NULL;
+ if (bpi->seqdata.seqar) {
+ MEM_freeN((void *)bpi->seqdata.seqar);
+ bpi->seqdata.seqar = NULL;
+ }
bpi->seqdata.scene = bpi->seqdata.scene->id.next;
}
} else {
Modified: branches/apricot/source/blender/src/view.c
===================================================================
--- branches/apricot/source/blender/src/view.c 2008-04-28 12:14:30 UTC (rev 14592)
+++ branches/apricot/source/blender/src/view.c 2008-04-28 12:22:28 UTC (rev 14593)
@@ -1082,7 +1082,7 @@
if ((U.uiflag & USER_ORBIT_ZBUF) && (U.viewzoom==USER_ZOOM_CONT) && (G.vd->persp==V3D_PERSP)) {
/* Secret apricot feature, translate the view when in continues mode */
upvec[0] = upvec[1] = 0;
- upvec[2] = dist0 - G.vd->dist;
+ upvec[2] = (dist0 - G.vd->dist) * G.vd->grid;
G.vd->dist = dist0;
Mat3CpyMat4(mat, G.vd->viewinv);
Mat3MulVecfl(mat, upvec);
More information about the Bf-blender-cvs
mailing list