Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Smith <j.jaydez@gmail.com>2010-06-20 10:15:54 +0400
committerJonathan Smith <j.jaydez@gmail.com>2010-06-20 10:15:54 +0400
commit6398e2daddfa7c53433cf8a5204aa80cdd12a7d5 (patch)
treed8b0e39c4e555e7cc5c84dbd3dff0734a2978c8d
parent0a9eaafc99bda2a49732ba6404af08a9431d64fc (diff)
Added fontid args to all missing spots so that script now displays text distance on the screen
-rw-r--r--space_view3d_panel_measure.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index 51e559dd..f338ae58 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -502,14 +502,14 @@ def draw_measurements_callback(self, context):
# 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):