no longer use 'check_existing' to see if we need to have a save popup, instead use 'exec' operator on a saved file and

invoke on unsaved files.

correct missing memset --> CustomData_reset switch too.
This commit is contained in:
Campbell Barton
2012-10-31 17:03:31 +00:00
parent 5dfe20d87b
commit d705c52e65
6 changed files with 48 additions and 67 deletions

View File

@@ -1290,7 +1290,7 @@ class WM_OT_blenderplayer_start(Operator):
return {'CANCELLED'}
filepath = os.path.join(bpy.app.tempdir, "game.blend")
bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True)
bpy.ops.wm.save_as_mainfile('EXEC_DEFAULT', filepath=filepath, copy=True)
subprocess.call([player_path, filepath])
return {'FINISHED'}