[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13377] trunk/blender/source/blender/src: * Made the "mini axis" draw with lines proportional to it's size.

Joshua Leung aligorith at gmail.com
Thu Jan 24 01:03:17 CET 2008


Revision: 13377
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13377
Author:   aligorith
Date:     2008-01-24 01:03:16 +0100 (Thu, 24 Jan 2008)

Log Message:
-----------
* Made the "mini axis" draw with lines proportional to it's size. Currently, the thick lines are a bit too thick at larger sizes, but it's better than having slower viewports.

* Fixed bug with IPO-transform. When "Switch Mouse Buttons" is on, click-drag transforms of keys didn't work.

Modified Paths:
--------------
    trunk/blender/source/blender/src/drawview.c
    trunk/blender/source/blender/src/editipo.c

Modified: trunk/blender/source/blender/src/drawview.c
===================================================================
--- trunk/blender/source/blender/src/drawview.c	2008-01-23 22:46:09 UTC (rev 13376)
+++ trunk/blender/source/blender/src/drawview.c	2008-01-24 00:03:16 UTC (rev 13377)
@@ -1409,6 +1409,11 @@
 	float dx, dy;
 	float h, s, v;
 	
+	/* thickness of lines is proportional to k */
+	/*	(log(k)-1) gives a more suitable thickness, but fps decreased by about 3 fps */
+	glLineWidth(k / 10);
+	//glLineWidth(log(k)-1); // a bit slow
+	
 	BIF_GetThemeColor3ubv(TH_GRID, (char *)gridcol);
 	
 	/* X */
@@ -1473,6 +1478,9 @@
 		glRasterPos2i(start + dx + 2, start + dy + ydisp + 2);
 		BMF_DrawString(G.fonts, "z");
 	}
+	
+	/* restore line-width */
+	glLineWidth(1.0);
 }
 
  	

Modified: trunk/blender/source/blender/src/editipo.c
===================================================================
--- trunk/blender/source/blender/src/editipo.c	2008-01-23 22:46:09 UTC (rev 13376)
+++ trunk/blender/source/blender/src/editipo.c	2008-01-24 00:03:16 UTC (rev 13377)
@@ -1660,7 +1660,7 @@
 	xo= mval[0]; 
 	yo= mval[1];
 	
-	while(get_mbut()&R_MOUSE) {		
+	while (get_mbut() & ((U.flag & USER_LMOUSESELECT)?L_MOUSE:R_MOUSE)) {		
 		getmouseco_areawin(mval);
 		if(abs(mval[0]-xo)+abs(mval[1]-yo) > 4) {
 			





More information about the Bf-blender-cvs mailing list