2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 13:04:56 +00:00

Blender 3.0 fixes

This commit is contained in:
2022-01-02 19:25:11 -08:00
parent 5491fd75cf
commit 2f0febba27
6 changed files with 64 additions and 51 deletions

View File

@@ -505,7 +505,11 @@ try:
bpy.context.preferences.filepaths.save_version = 0
print('SAVING %s' % loaded_blend)
if loaded_blend:
if 'FINISHED' in bpy.ops.wm.save_as_mainfile(filepath=loaded_blend, check_existing=False, compress=True):
if bpy.app.version >= (3, 0, 0):
ret = bpy.ops.wm.save_as_mainfile(filepath=loaded_blend, check_existing=False, compress=False)
else:
ret = bpy.ops.wm.save_as_mainfile(filepath=loaded_blend, check_existing=False, compress=True)
if 'FINISHED' in ret:
writepipestr(b'FINISHED')
else:
writepipestr(b'CANCELLED')