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:
authorVilém Duha <vilda.novak@gmail.com>2020-12-05 20:26:05 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-12-05 20:26:05 +0300
commit05fd1e08cfb277b1ea13bfca47fbb56dca156032 (patch)
tree2c8df464f7de39874e850473d0814076b7c9fc7d /blenderkit/bg_blender.py
parent8c87cf0afccb2bb73a3575eaa58016cfec4e177a (diff)
BlenderKit: resolutions
This introduces resolutins into the addon. This update should enhance the usability of the addon, especially for people with weaker computers. It downloads reduced version of the assets - only images are scaled down by now. Images are also converted in some cases from .png to .jpgs to save space. - there's a default resolution setting - resolutions can be swapped by user - resolutions apply only to textured models and materials with textures larger than 1024px - Resolutions aren't yet generated on the server, so will be visible after a few days. Version of the addon was bumped up to 1.0.40.
Diffstat (limited to 'blenderkit/bg_blender.py')
-rw-r--r--blenderkit/bg_blender.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/blenderkit/bg_blender.py b/blenderkit/bg_blender.py
index c9ec43e4..a8597675 100644
--- a/blenderkit/bg_blender.py
+++ b/blenderkit/bg_blender.py
@@ -93,14 +93,21 @@ def progress(text, n=None):
else:
n = ' ' + ' ' + str(int(n * 1000) / 1000) + '% '
spaces = ' ' * (len(text) + 55)
- sys.stdout.write('progress{%s%s}\n' % (text, n))
- sys.stdout.flush()
+ try:
+ sys.stdout.write('progress{%s%s}\n' % (text, n))
+
+ sys.stdout.flush()
+ except Exception as e:
+ print('background progress reporting race condition')
+ print(e)
# @bpy.app.handlers.persistent
def bg_update():
'''monitoring of background process'''
text = ''
+ #utils.p('timer search')
+
s = bpy.context.scene
global bg_processes
@@ -195,8 +202,6 @@ class KillBgProcess(bpy.types.Operator):
# print(tcom.process_type, self.process_type)
if tcom.process_type == self.process_type:
source = eval(tcom.eval_path)
- print(source.bl_rna.name, self.process_source)
- print(source.name)
kill = False
if source.bl_rna.name == 'Object' and self.process_source == 'MODEL':
if source.name == bpy.context.active_object.name: