[Bf-extensions-cvs] [39de2639] master: BlenderKit: update and fix thumbnailers

Vilém Duha noreply at git.blender.org
Mon Sep 28 18:28:54 CEST 2020


Commit: 39de263951fd080255305201dbfd6f6a862c671f
Author: Vilém Duha
Date:   Mon Sep 28 18:28:47 2020 +0200
Branches: master
https://developer.blender.org/rBA39de263951fd080255305201dbfd6f6a862c671f

BlenderKit: update and fix thumbnailers

-material thumbnailer was broken due to API changes (undocumented this time.. - ob.data.texture_space became not writeable)
-material thumbnailer
   - cube was removed, replaced with complex ball - better for edgwear and thin material previews.
   - hair preview is now beautiful.
-both thumbnailers use openimagedenoise and adaptive sampling - renders faster with better results.
-tweak tiles size for better performance

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

M	blenderkit/__init__.py
M	blenderkit/autothumb_material_bg.py
M	blenderkit/blendfiles/material_thumbnailer_cycles.blend
M	blenderkit/blendfiles/thumbnailer.blend

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

diff --git a/blenderkit/__init__.py b/blenderkit/__init__.py
index fba80a7e..9294e44b 100644
--- a/blenderkit/__init__.py
+++ b/blenderkit/__init__.py
@@ -807,7 +807,7 @@ class BlenderKitMaterialUploadProps(PropertyGroup, BlenderKitCommonUploadProps):
         name="Thumbnail Style",
         items=(
             ('BALL', 'Ball', ""),
-            ('CUBE', 'Cube', 'cube'),
+            ('BALL_COMPLEX', 'Ball complex', 'Complex ball to highlight edgewear or material thickness'),
             ('FLUID', 'Fluid', 'Fluid'),
             ('CLOTH', 'Cloth', 'Cloth'),
             ('HAIR', 'Hair', 'Hair  ')
diff --git a/blenderkit/autothumb_material_bg.py b/blenderkit/autothumb_material_bg.py
index 51552c79..c8d34979 100644
--- a/blenderkit/autothumb_material_bg.py
+++ b/blenderkit/autothumb_material_bg.py
@@ -62,7 +62,7 @@ if __name__ == "__main__":
 
         colmapdict = {
             'BALL': 'Ball',
-            'CUBE': 'Cube',
+            'BALL_COMPLEX': 'Ball complex',
             'FLUID': 'Fluid',
             'CLOTH': 'Cloth',
             'HAIR': 'Hair'
@@ -79,6 +79,7 @@ if __name__ == "__main__":
         for ob in bpy.context.visible_objects:
             if ob.name[:15] == 'MaterialPreview':
                 ob.material_slots[0].material = mat
+                ob.data.use_auto_texspace = False
                 ob.data.texspace_size.x = 1 / tscale
                 ob.data.texspace_size.y = 1 / tscale
                 ob.data.texspace_size.z = 1 / tscale
@@ -88,7 +89,7 @@ if __name__ == "__main__":
                 else:
                     ob.cycles.use_adaptive_subdivision = False
                 ts = data['texture_size_meters']
-                if data["thumbnail_type"] in ['BALL', 'CUBE', 'CLOTH']:
+                if data["thumbnail_type"] in ['BALL', 'BALL_COMPLEX', 'CLOTH']:
                    utils.automap(ob.name, tex_size = ts / tscale, just_scale = True, bg_exception=True)
         bpy.context.view_layer.update()
 
diff --git a/blenderkit/blendfiles/material_thumbnailer_cycles.blend b/blenderkit/blendfiles/material_thumbnailer_cycles.blend
index 220e1aba..a546c15b 100644
Binary files a/blenderkit/blendfiles/material_thumbnailer_cycles.blend and b/blenderkit/blendfiles/material_thumbnailer_cycles.blend differ
diff --git a/blenderkit/blendfiles/thumbnailer.blend b/blenderkit/blendfiles/thumbnailer.blend
index 970499c3..4a27eeab 100644
Binary files a/blenderkit/blendfiles/thumbnailer.blend and b/blenderkit/blendfiles/thumbnailer.blend differ



More information about the Bf-extensions-cvs mailing list