[Bf-extensions-cvs] [666379fe] master: Measureit: Fix unreported missing scene scale in arcs

Antonio Vazquez noreply at git.blender.org
Fri Jul 31 10:02:19 CEST 2020


Commit: 666379fe7cf7455b892d5e1b66f3928102cca3a1
Author: Antonio Vazquez
Date:   Fri Jul 31 10:02:07 2020 +0200
Branches: master
https://developer.blender.org/rBA666379fe7cf7455b892d5e1b66f3928102cca3a1

Measureit: Fix unreported missing scene scale in arcs

The scale of the scene was not applied to the arcs. This fix is related to D8418, but with minor changes.

===================================================================

M	measureit/measureit_geometry.py

===================================================================

diff --git a/measureit/measureit_geometry.py b/measureit/measureit_geometry.py
index 1f314f7f..998bc038 100644
--- a/measureit/measureit_geometry.py
+++ b/measureit/measureit_geometry.py
@@ -413,7 +413,7 @@ def draw_segments(context, myobj, op, region, rv3d):
                             if ms.gltype == 11:  # arc
                                 # print length or arc and angle
                                 if ms.glarc_len is True:
-                                    tx_dist = ms.glarc_txlen + format_distance(fmt, units, arc_length)
+                                    tx_dist = ms.glarc_txlen + format_distance(fmt, units, arc_length * scale)
                                 else:
                                     tx_dist = " "
 
@@ -453,7 +453,7 @@ def draw_segments(context, myobj, op, region, rv3d):
                                 if scene.measureit_gl_show_d is True and ms.gldist is True and \
                                         ms.glarc_rad is True:
                                     tx_dist = ms.glarc_txradio + format_distance(fmt, units,
-                                                                                 dist * scene.measureit_scale_factor)
+                                                                                 dist * scene.measureit_scale_factor * scale)
                                 else:
                                     tx_dist = " "
                             if ms.gltype == 2:



More information about the Bf-extensions-cvs mailing list