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>2019-11-19 02:45:02 +0300
committerVilém Duha <vilda.novak@gmail.com>2019-11-19 02:45:02 +0300
commit64dcfc8dc1c43a77f16c848219cac5e396368093 (patch)
tree01a95f19dc16a7bf1820c19aa5b9d0a98fbe37a6
parentf445b50bba33fdb327b8b5e4a61695e563459fc8 (diff)
BlenderKit: fix another UI slowdown connected to rating preview+downloaders drawing loading into the same preview image.v2.81
-rw-r--r--blenderkit/ui.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index 8aa18913..bde37c59 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -659,11 +659,14 @@ def draw_callback_2d_progress(self, context):
for threaddata in download.download_threads:
asset_data = threaddata[1]
tcom = threaddata[2]
+
+ directory = paths.get_temp_dir('%s_search' % asset_data['asset_type'])
+ tpath = os.path.join(directory, asset_data['thumbnail_small'])
+ img = utils.get_hidden_image(tpath, asset_data['id'])
+
if tcom.passargs.get('downloaders'):
for d in tcom.passargs['downloaders']:
- directory = paths.get_temp_dir('%s_search' % asset_data['asset_type'])
- tpath = os.path.join(directory, asset_data['thumbnail_small'])
- img = utils.get_hidden_image(tpath, 'rating_preview')
+
loc = view3d_utils.location_3d_to_region_2d(bpy.context.region, bpy.context.space_data.region_3d,
d['location'])
if loc is not None: