[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [40593] branches/soc-2011-cucumber/release /scripts/startup/bl_operators/wm.py: launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
Dalai Felinto
dfelinto at gmail.com
Tue Sep 27 08:44:33 CEST 2011
Revision: 40593
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40593
Author: dfelinto
Date: 2011-09-27 06:44:32 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
launch blenderplayer from ui not working in OSX fix - by Daniel Stokes and me
Modified Paths:
--------------
branches/soc-2011-cucumber/release/scripts/startup/bl_operators/wm.py
Modified: branches/soc-2011-cucumber/release/scripts/startup/bl_operators/wm.py
===================================================================
--- branches/soc-2011-cucumber/release/scripts/startup/bl_operators/wm.py 2011-09-27 05:55:05 UTC (rev 40592)
+++ branches/soc-2011-cucumber/release/scripts/startup/bl_operators/wm.py 2011-09-27 06:44:32 UTC (rev 40593)
@@ -1193,6 +1193,11 @@
player_path = os.path.join(blender_bin_dir, 'blenderplayer' + ext)
def execute(self, context):
+ import sys
+
+ if sys.platform == 'darwin':
+ self.player_path = os.path.join(self.blender_bin_dir, '../../../blenderplayer.app/Contents/MacOS/blenderplayer')
+
filepath = bpy.app.tempdir + "game.blend"
bpy.ops.wm.save_as_mainfile(filepath=filepath, check_existing=False, copy=True)
subprocess.call([self.player_path, filepath])
More information about the Bf-blender-cvs
mailing list