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:
authorMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2016-07-18 18:18:42 +0300
committerMikhail Rachinskiy <mikhail.rachinskiy@gmail.com>2016-07-18 18:18:42 +0300
commit0c0f93a887908bb68442be12f9728d3a84bc9a5b (patch)
treebf053865bd8bf126afbd624a30c611147461e95d /object_print3d_utils
parentb3522dff83e2ec482686262e9163d17d15b3f65a (diff)
Print3D: Make statistics less confusing D2107
Diffstat (limited to 'object_print3d_utils')
-rw-r--r--object_print3d_utils/operators.py25
1 files changed, 11 insertions, 14 deletions
diff --git a/object_print3d_utils/operators.py b/object_print3d_utils/operators.py
index bb2847d6..0ede00df 100644
--- a/object_print3d_utils/operators.py
+++ b/object_print3d_utils/operators.py
@@ -69,14 +69,12 @@ class Print3DInfoVolume(Operator):
bm.free()
info = []
- info.append(("Volume: %s³" % clean_float("%.8f" % volume),
- None))
- if unit.system == 'IMPERIAL':
- info.append(("%s \"³" % clean_float("%.4f" % ((volume * (scale ** 3.0)) / (0.0254 ** 3.0))),
- None))
+ if unit.system == 'METRIC':
+ info.append(("Volume: %s cm³" % clean_float("%.4f" % ((volume * (scale ** 3.0)) / (0.01 ** 3.0))), None))
+ elif unit.system == 'IMPERIAL':
+ info.append(("Volume: %s \"³" % clean_float("%.4f" % ((volume * (scale ** 3.0)) / (0.0254 ** 3.0))), None))
else:
- info.append(("%s cm³" % clean_float("%.4f" % ((volume * (scale ** 3.0)) / (0.01 ** 3.0))),
- None))
+ info.append(("Volume: %s³" % clean_float("%.8f" % volume), None))
report.update(*info)
return {'FINISHED'}
@@ -98,14 +96,13 @@ class Print3DInfoArea(Operator):
bm.free()
info = []
- info.append(("Area: %s²" % clean_float("%.8f" % area),
- None))
- if unit.system == 'IMPERIAL':
- info.append(("%s \"²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.0254 ** 2.0))),
- None))
+ if unit.system == 'METRIC':
+ info.append(("Area: %s cm²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.01 ** 2.0))), None))
+ elif unit.system == 'IMPERIAL':
+ info.append(("Area: %s \"²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.0254 ** 2.0))), None))
else:
- info.append(("%s cm²" % clean_float("%.4f" % ((area * (scale ** 2.0)) / (0.01 ** 2.0))),
- None))
+ info.append(("Area: %s²" % clean_float("%.8f" % area), None))
+
report.update(*info)
return {'FINISHED'}