Blender Crawl: Improvements based on User Feedback #53

Merged
Nick Alberelli merged 11 commits from fix/blender-crawl-improvements into main 2023-05-22 16:50:42 +02:00
Showing only changes of commit 2bd2aaa170 - Show all commits

View File

@ -0,0 +1,20 @@
import bpy
import contextlib
@contextlib.contextmanager
def override_save_version():
"""Overrides the save version settings"""
save_version = bpy.context.preferences.filepaths.save_version
try:
bpy.context.preferences.filepaths.save_version = 0
yield
finally:
bpy.context.preferences.filepaths.save_version = save_version
with override_save_version():
bpy.ops.wm.save_mainfile()
print(f"Saved file: '{bpy.data.filepath}'")
bpy.ops.wm.quit_blender()