diff options
author | Vilém Duha <vilda.novak@gmail.com> | 2020-09-28 19:28:47 +0300 |
---|---|---|
committer | Vilém Duha <vilda.novak@gmail.com> | 2020-09-28 19:28:47 +0300 |
commit | 39de263951fd080255305201dbfd6f6a862c671f (patch) | |
tree | 902a55d55b25a46e27e2bf9fe50f3eca54a90a06 | |
parent | d11dba8c07755df22b8062456013980788849a4c (diff) |
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
-rw-r--r-- | blenderkit/__init__.py | 2 | ||||
-rw-r--r-- | blenderkit/autothumb_material_bg.py | 5 | ||||
-rw-r--r-- | blenderkit/blendfiles/material_thumbnailer_cycles.blend | bin | 546240 -> 2974638 bytes | |||
-rw-r--r-- | blenderkit/blendfiles/thumbnailer.blend | bin | 218003 -> 217324 bytes |
4 files changed, 4 insertions, 3 deletions
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 Binary files differindex 220e1aba..a546c15b 100644 --- a/blenderkit/blendfiles/material_thumbnailer_cycles.blend +++ b/blenderkit/blendfiles/material_thumbnailer_cycles.blend diff --git a/blenderkit/blendfiles/thumbnailer.blend b/blenderkit/blendfiles/thumbnailer.blend Binary files differindex 970499c3..4a27eeab 100644 --- a/blenderkit/blendfiles/thumbnailer.blend +++ b/blenderkit/blendfiles/thumbnailer.blend |