[Bf-extensions-cvs] [64dcfc8d] blender-v2.81-release: BlenderKit: fix another UI slowdown connected to rating preview+downloaders drawing loading into the same preview image.

Vilém Duha noreply at git.blender.org
Tue Nov 19 00:46:42 CET 2019


Commit: 64dcfc8dc1c43a77f16c848219cac5e396368093
Author: Vilém Duha
Date:   Tue Nov 19 00:45:02 2019 +0100
Branches: blender-v2.81-release
https://developer.blender.org/rBA64dcfc8dc1c43a77f16c848219cac5e396368093

BlenderKit: fix another UI slowdown connected to rating preview+downloaders drawing loading into the same preview image.

===================================================================

M	blenderkit/ui.py

===================================================================

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:



More information about the Bf-extensions-cvs mailing list