diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2020-01-13 15:26:35 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2020-01-13 15:26:35 +0300 |
commit | 2ffb35765e88fa190ad2c8ca7ff01ebc74ed5837 (patch) | |
tree | a357d5ad0a35241e6a8f703d745f8344a0154921 /blenderkit | |
parent | ea1aedbc57d46cedfae09be286b3fd64fa54c2c7 (diff) | |
parent | 2d192b40050e63b198c3287d9a7ada5f3352c589 (diff) |
Merge remote-tracking branch 'origin/blender-v2.81-release' into blender-v2.82-release
This was neglected in the 2.81 development cycle, so master didn't
include some commits when we created this branch.
Diffstat (limited to 'blenderkit')
-rw-r--r-- | blenderkit/ui.py | 9 | ||||
-rw-r--r-- | blenderkit/utils.py | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/blenderkit/ui.py b/blenderkit/ui.py index 069809c6..fc9563a9 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: diff --git a/blenderkit/utils.py b/blenderkit/utils.py index 784fc47b..c1a59cd8 100644 --- a/blenderkit/utils.py +++ b/blenderkit/utils.py @@ -252,11 +252,12 @@ def get_hidden_image(tpath, bdata_name, force_reload=False): img.filepath = tpath img.reload() + img.colorspace_settings.name = 'Linear' elif force_reload: if img.packed_file is not None: img.unpack(method='USE_ORIGINAL') img.reload() - img.colorspace_settings.name = 'Linear' + img.colorspace_settings.name = 'Linear' return img |