Revision: 26243
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26243
Author: aligorith
Date: 2010-01-25 12:06:55 +0100 (Mon, 25 Jan 2010)
Log Message:
-----------
Durian Request/Bugfixes: Graph Editor Zooming doesn't go far enough
Pushed limits for Graph Editor view extents to proper limits, and fixed
clamping used in View2D code which was preventing height of View2D viewports
from getting below 1.0
Modified Paths:
--------------
trunk/blender/source/blender/blenloader/intern/readfile.c
trunk/blender/source/blender/editors/interface/view2d.c
trunk/blender/source/blender/editors/space_graph/space_graph.c
Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c 2010-01-25
10:20:41 UTC (rev 26242)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c 2010-01-25
11:06:55 UTC (rev 26243)
@@ -4632,7 +4632,7 @@
for (sl= sa->spacedata.first; sl; sl= sl->next)
{
if(sl->spacetype==SPACE_VIEW3D) {
View3D *v3d= (View3D*) sl;
- BGpic *bgpic;
+ BGpic *bgpic = NULL;
v3d->camera= newlibadr(fd,
sc->id.lib, v3d->camera);
v3d->ob_centre= newlibadr(fd,
sc->id.lib, v3d->ob_centre);
@@ -6184,7 +6184,13 @@
/* init mainarea view2d */
ar->v2d.scroll |=
(V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |=
(V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
-
+
+ ar->v2d.min[0]= FLT_MIN;
+ ar->v2d.min[1]= FLT_MIN;
+
+ ar->v2d.max[0]= MAXFRAMEF;
+ ar->v2d.max[1]= FLT_MAX;
+
//ar->v2d.flag |= V2D_IS_INITIALISED;
break;
}
Modified: trunk/blender/source/blender/editors/interface/view2d.c
===================================================================
--- trunk/blender/source/blender/editors/interface/view2d.c 2010-01-25
10:20:41 UTC (rev 26242)
+++ trunk/blender/source/blender/editors/interface/view2d.c 2010-01-25
11:06:55 UTC (rev 26243)
@@ -25,6 +25,7 @@
* ***** END GPL LICENSE BLOCK *****
*/
+#include <float.h>
#include <limits.h>
#include <math.h>
#include <string.h>
@@ -347,11 +348,14 @@
if (v2d->keepzoom & V2D_LOCKZOOM_Y)
height= winy;
- /* values used to divide, so make it safe */
- if(width<1) width= 1;
- if(height<1) height= 1;
- if(winx<1) winx= 1;
- if(winy<1) winy= 1;
+ /* values used to divide, so make it safe
+ * NOTE: width and height must use FLT_MIN instead of 1, otherwise it
is impossible to
+ * get enough resolution in Graph Editor for editing some
curves
+ */
+ if(width < FLT_MIN) width= 1;
+ if(height < FLT_MIN) height= 1;
+ if(winx < 1) winx= 1;
+ if(winy < 1) winy= 1;
/* V2D_LIMITZOOM indicates that zoom level should be preserved when the
window size changes */
if (resize && (v2d->keepzoom & V2D_KEEPZOOM)) {
Modified: trunk/blender/source/blender/editors/space_graph/space_graph.c
===================================================================
--- trunk/blender/source/blender/editors/space_graph/space_graph.c
2010-01-25 10:20:41 UTC (rev 26242)
+++ trunk/blender/source/blender/editors/space_graph/space_graph.c
2010-01-25 11:06:55 UTC (rev 26243)
@@ -151,11 +151,11 @@
ar->v2d.cur= ar->v2d.tot;
- ar->v2d.min[0]= 0.00001f;
- ar->v2d.min[1]= 0.00001f;
-
+ ar->v2d.min[0]= FLT_MIN;
+ ar->v2d.min[1]= FLT_MIN;
+
ar->v2d.max[0]= MAXFRAMEF;
- ar->v2d.max[1]= 50000.0f;
+ ar->v2d.max[1]= FLT_MAX;
ar->v2d.scroll= (V2D_SCROLL_BOTTOM|V2D_SCROLL_SCALE_HORIZONTAL);
ar->v2d.scroll |= (V2D_SCROLL_LEFT|V2D_SCROLL_SCALE_VERTICAL);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs