diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-04-16 06:28:18 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-04-16 06:28:18 +0400 |
commit | d9fa08e73d71732f3170d3817e5ab51f72c62c82 (patch) | |
tree | 50b477e8ff5d2ed31cc318182029dbf6c4a09685 /release/scripts | |
parent | 034d5194ab9a6d407e91d0875b72d4dd04fa9089 (diff) |
rename wm.blenderplayer_start label from 'Start' to 'Start Game In Player', also made it check if the player is found before running.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/wm.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py index 78f14137ad1..926ad9b94f7 100644 --- a/release/scripts/startup/bl_operators/wm.py +++ b/release/scripts/startup/bl_operators/wm.py @@ -1195,7 +1195,7 @@ class WM_OT_copy_prev_settings(Operator): class WM_OT_blenderplayer_start(Operator): '''Launch the blender-player with the current blend-file''' bl_idname = "wm.blenderplayer_start" - bl_label = "Start" + bl_label = "Start Game In Player" def execute(self, context): import os @@ -1212,6 +1212,10 @@ class WM_OT_blenderplayer_start(Operator): if sys.platform == "darwin": player_path = os.path.join(blender_bin_dir, "../../../blenderplayer.app/Contents/MacOS/blenderplayer") + if not os.path.exists(player_path): + self.report({'ERROR'}, "Player path: %r not found" % player_path) + return {'CANCELLED'} + filepath = os.path.join(bpy.app.tempdir, "game.blend") bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True) subprocess.call([player_path, filepath]) |