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-09-28 20:23:19 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-09-28 20:23:19 +0300
commite22a44f02b83b14d6d5c9b16c410266d230da882 (patch)
tree8973bbfc665dec8136d132d5c20b547e08eb1924
parent39de263951fd080255305201dbfd6f6a862c671f (diff)
BlenderKit: more small performance tweaks to the material thumbnailer.
also fix a small bug in ui drawing (this has to be fixed better - reading of 'thumbnail not ready' is now broken)
-rw-r--r--blenderkit/blendfiles/material_thumbnailer_cycles.blendbin2974638 -> 2966715 bytes
-rw-r--r--blenderkit/ui.py2
2 files changed, 1 insertions, 1 deletions
diff --git a/blenderkit/blendfiles/material_thumbnailer_cycles.blend b/blenderkit/blendfiles/material_thumbnailer_cycles.blend
index a546c15b..fd71b79b 100644
--- a/blenderkit/blendfiles/material_thumbnailer_cycles.blend
+++ b/blenderkit/blendfiles/material_thumbnailer_cycles.blend
Binary files differ
diff --git a/blenderkit/ui.py b/blenderkit/ui.py
index bf2785ed..1bfd708f 100644
--- a/blenderkit/ui.py
+++ b/blenderkit/ui.py
@@ -796,7 +796,7 @@ def draw_callback_2d_search(self, context):
index = a + ui_props.scrolloffset + b * ui_props.wcount
iname = utils.previmg_name(index)
img = bpy.data.images.get(iname)
- if img is not None:
+ if img is not None and img.size[0]>0 and img.size[1]>0:
w = int(ui_props.thumb_size * img.size[0] / max(img.size[0], img.size[1]))
h = int(ui_props.thumb_size * img.size[1] / max(img.size[0], img.size[1]))
crop = (0, 0, 1, 1)