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:
authorVilem Duha <vilem.duha@gmail.com>2021-10-03 19:57:28 +0300
committerVilem Duha <vilem.duha@gmail.com>2021-10-03 19:57:28 +0300
commit2965c7afc0d5e951b9bee16a1dcf182f2aec0a44 (patch)
treed475603b542ec2a774148b9925b6935827bb8fc2 /blenderkit/resolutions.py
parent0e4e0814061aba83c58ba8eb8cba2651248a44db (diff)
BlenderKit fix bg blender crash due to new file preview code
A new preview code from 6th september crashes Blender when saving files in background mode. This circumvents the bug by now.
Diffstat (limited to 'blenderkit/resolutions.py')
-rw-r--r--blenderkit/resolutions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/blenderkit/resolutions.py b/blenderkit/resolutions.py
index 645a306d..7a3f3671 100644
--- a/blenderkit/resolutions.py
+++ b/blenderkit/resolutions.py
@@ -386,6 +386,9 @@ def generate_lower_resolutions(data):
i.pack()
# save
print(fpath)
+ # if this isn't here, blender crashes.
+ bpy.context.preferences.filepaths.file_preview_type = 'NONE'
+
# save the file
bpy.ops.wm.save_as_mainfile(filepath=fpath, compress=True, copy=True)
# compare file sizes