2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-10 13:47:46 +00:00

Features to support cooking

This commit is contained in:
Jack Andersen
2015-09-30 14:40:06 -10:00
parent 63a432090c
commit 391ee13816
8 changed files with 147 additions and 56 deletions

View File

@@ -135,17 +135,21 @@ while True:
writepipeline(b'CANCELLED')
elif cmdargs[0] == 'CREATE':
if len(cmdargs) >= 3:
bpy.ops.wm.open_mainfile(filepath=cmdargs[2])
if len(cmdargs) >= 4:
bpy.ops.wm.open_mainfile(filepath=cmdargs[3])
else:
bpy.ops.wm.read_homefile()
bpy.context.user_preferences.filepaths.save_version = 0
if 'FINISHED' in bpy.ops.wm.save_as_mainfile(filepath=cmdargs[1]):
bpy.ops.file.hecl_patching_load()
bpy.context.scene.hecl_type = cmdargs[2]
writepipeline(b'FINISHED')
else:
writepipeline(b'CANCELLED')
elif cmdargs[0] == 'GETTYPE':
writepipeline(bpy.context.scene.hecl_type.encode())
elif cmdargs[0] == 'SAVE':
bpy.context.user_preferences.filepaths.save_version = 0
if 'FINISHED' in bpy.ops.wm.save_mainfile(check_existing=False, compress=True):