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 19:28:47 +0300
committerVilém Duha <vilda.novak@gmail.com>2020-09-28 19:28:47 +0300
commit39de263951fd080255305201dbfd6f6a862c671f (patch)
tree902a55d55b25a46e27e2bf9fe50f3eca54a90a06 /blenderkit/autothumb_material_bg.py
parentd11dba8c07755df22b8062456013980788849a4c (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
Diffstat (limited to 'blenderkit/autothumb_material_bg.py')
-rw-r--r--blenderkit/autothumb_material_bg.py5
1 files changed, 3 insertions, 2 deletions
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()