blender/source/gameengine/GamePlayer
Campbell Barton b5b24ee521 BGE Python sys.path for the blenderplayer and blender
sys.path is the search path for python modules. This is useful so people making games can put all their scripts in a folder and be sure they will always load into the BGE.

for each blend file a scripts directory is added to the path
 /home/me/foo.blend
will look for modules in...
 /home/me/scripts/*.py 

It could also default to look for modules in the same directory as the blend file but I think this is messy.
Added a note in the tooltip about //scripts so its not such a hidden feature.

This works by storing the original sys.path, then adding the paths for the blendfile and all its libs,
when a new blendfile is loaded, the original sys.path is restored before adding the blendfiles paths again so the sys.path wont get junk in it.

One problem with this - when using linked libs the module names must be unique else it will load the wrong module for one of the controllers.

also fixed 2 bugs
- sys.path in the blenderplayer was growing by 1 for every file load in blenderplayer
- the relative path (gp_GamePythonPath), wasnt being set when loading files in the blenderlayer (as I wrongly said in the last commit).
2009-04-30 08:01:31 +00:00
..
common Fix for part of bug #18496: issue with light state switching 2009-04-23 13:30:34 +00:00
ghost BGE Python sys.path for the blenderplayer and blender 2009-04-30 08:01:31 +00:00
CMakeLists.txt Patch 17508: Blender Web Plugin - XEmbed. Enable XEmbed integration of blenderplayer, using -i as input parameter to pass embedder window id. create a minimal web plugin to embed blenderplayer on web pages (using gecko/mozilla as browser). Only for *nix. 2008-09-09 21:15:30 +00:00
Makefile Fixing up the webplugin defines for the Makefiles. 2008-05-08 18:38:21 +00:00
SConscript == SCons == 2006-02-04 14:15:10 +00:00