diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2021-05-05 13:17:36 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2021-05-11 13:31:29 +0300 |
commit | a1594de99d3e6ea8cee32f60588d500da4c3ae5e (patch) | |
tree | c7e097f27246138d5317adab95c13d579afd4ce7 /blenderkit/ui_panels.py | |
parent | 86194403316fe9fe7f5c857f9c10a20bb7b5a7d5 (diff) |
BlenderKit: display file size in asset card and increase addon version
Diffstat (limited to 'blenderkit/ui_panels.py')
-rw-r--r-- | blenderkit/ui_panels.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/blenderkit/ui_panels.py b/blenderkit/ui_panels.py index 220070b2..bc1d4984 100644 --- a/blenderkit/ui_panels.py +++ b/blenderkit/ui_panels.py @@ -1544,6 +1544,14 @@ class AssetPopupCard(bpy.types.Operator, ratings_utils.RatingsProperties): utils.fmt_length(mparams['dimensionY']), utils.fmt_length(mparams['dimensionZ'])) self.draw_property(box, 'Size:', t) + if self.asset_data.get('filesSize'): + fs = self.asset_data['filesSize'] + fsmb = fs // (1024 * 1024) + fskb = fs % 1024 + if fsmb == 0: + self.draw_property(box,'Original size:', f'{fskb}KB') + else: + self.draw_property(box,'Original size:', f'{fsmb}MB') # Tags section # row = box.row() # letters_on_row = 0 |