diff options
Diffstat (limited to 'release/scripts/startup/bl_operators/wm.py')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index c575b6dfdaf..0b379d3852c 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1286,9 +1286,10 @@ class WM_OT_blenderplayer_start(Operator): self.report({'ERROR'}, "Player path: %r not found" % player_path) return {'CANCELLED'} - filepath = os.path.join(bpy.app.tempdir, "game.blend") + filepath = bpy.data.filepath+'~' if bpy.data.is_saved else os.path.join(bpy.app.tempdir, "game.blend") bpy.ops.wm.save_as_mainfile('EXEC_DEFAULT', filepath=filepath, copy=True) subprocess.call([player_path, filepath]) + os.unlink(filepath) return {'FINISHED'} |