From d9fa08e73d71732f3170d3817e5ab51f72c62c82 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 16 Apr 2012 02:28:18 +0000 Subject: [PATCH] rename wm.blenderplayer_start label from 'Start' to 'Start Game In Player', also made it check if the player is found before running. --- release/scripts/startup/bl_operators/wm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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])