From 39de263951fd080255305201dbfd6f6a862c671f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vil=C3=A9m=20Duha?= Date: Mon, 28 Sep 2020 18:28:47 +0200 Subject: 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 --- blenderkit/autothumb_material_bg.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'blenderkit/autothumb_material_bg.py') 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() -- cgit v1.2.3