rename wm.blenderplayer_start label from 'Start' to 'Start Game In Player', also...
authorCampbell Barton <ideasman42@gmail.com>
Mon, 16 Apr 2012 02:28:18 +0000 (02:28 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 16 Apr 2012 02:28:18 +0000 (02:28 +0000)
release/scripts/startup/bl_operators/wm.py

index 78f14137ad1e6f31ee0e20bdcfd4aff38d2ec666..926ad9b94f7318738e1d49d63e225a9c076ca0d2 100644 (file)
@@ -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])