[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [744] trunk/py/scripts/addons/ space_view3d_panel_measure.py: Added fontid args to all missing spots so that script now displays text distance on the screen
Jonathan Smith
j.jaydez at gmail.com
Sun Jun 20 08:15:55 CEST 2010
Revision: 744
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-extensions&revision=744
Author: jaydez
Date: 2010-06-20 08:15:54 +0200 (Sun, 20 Jun 2010)
Log Message:
-----------
Added fontid args to all missing spots so that script now displays text distance on the screen
Modified Paths:
--------------
trunk/py/scripts/addons/space_view3d_panel_measure.py
Modified: trunk/py/scripts/addons/space_view3d_panel_measure.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_panel_measure.py 2010-06-20 00:40:35 UTC (rev 743)
+++ trunk/py/scripts/addons/space_view3d_panel_measure.py 2010-06-20 06:15:54 UTC (rev 744)
@@ -502,14 +502,14 @@
# we can draw it OVER the line.
coord_2d = region3d_get_2d_coordinates(context, p2 + (p1 - p2) * 0.5)
offset = 10 # Offset the text a bit to the right.
- blf.position(coord_2d[0] + offset, coord_2d[1], 0)
+ blf.position(0, coord_2d[0] + offset, coord_2d[1], 0)
dist = (p1 - p2).length
text = "Distance: " + str(round(dist, PRECISION)) + " BU"
# @todo Get user pref for text color in 3D View
bgl.glColor4f(1.0, 1.0, 1.0, 1.0)
- blf.size(12, 72) # Prevent font size to randomly change.
- blf.draw(text)
+ blf.size(0, 12, 72) # Prevent font size to randomly change.
+ blf.draw(0, text)
class VIEW3D_OT_display_measurements(bpy.types.Operator):
More information about the Bf-extensions-cvs
mailing list