Add number and memory size formatting throughout the UI

This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248
This commit is contained in:
Diego Gangl
2018-05-25 22:17:15 +02:00
committed by Julian Eisel
parent 9dca74f0e5
commit 4dee702332
6 changed files with 125 additions and 15 deletions

View File

@@ -328,7 +328,8 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "delimit")
layout_info = layout
layout_info.label(text=iface_("Faces: %d") % md.face_count, translate=False)
layout_info.label(text=iface_("Face Count: {:,}".format(md.face_count)),
translate=False)
def DISPLACE(self, layout, ob, md):
has_texture = (md.texture is not None)