[Bf-committers] [Bf-blender-cvs] SVN commit: /data/svn/bf-blender  trunk/blender/source: BGE Python sys.path for the blenderplayer and blender
ideasman42 at gmail.com
Fri May 1 11:44:55 CEST 2009
Basically the difference is in 2.48a you could not be sure your
blendfiles directory would be in the sys.path, now this is always the
case for the player and blender, including linked libraries.
in 2.48a the blenderplayer path was not initialized for any system,
youd just get the same sys.path as running python from the command
By initializing sys.argv now we always get blenders binary path
included. With my recent commit, all the blendfiles will have their
paths added to the sys.path too.
In blender (not the player) the sys.path is already setup to include
blenders scripts dir's so maybe this is what you mean.
packages work normally of course in all cases however the option to
run a package directly isnt working yet like it is for modules with
the python controller.
On Fri, May 1, 2009 at 12:55 AM, Mitchell Stokes <mogurijin at gmail.com> wrote:
> To be honest, I don't know what the original problem was, or what the
> problem is now. Using external scripts already works, you just have to
> import them as modules. Also, packages already work too. Also I
> thought Blender's directory was always in the Python path (except for
> the Linux bug that I think got fixed).
> --Mitchell Stokes (Moguri)
> On Thu, Apr 30, 2009 at 9:41 PM, Campbell Barton <ideasman42 at gmail.com> wrote:
>> Moguri pointed out we can add the blendfile path and use python
>> packages to avoid making the directories a mess.
>> So you can import a directory of py files.
>> As well as - "module.func" you could do "package.module.func" so we
>> have the best of both worlds.
>> Will remove hard coded "//scripts" and add support for this on the weekend.
>> This also reminded me that it would be useful to allow external
>> text's, where blender didnt need to manually refresh the internal
>> texts. This way games could store scripts externally.
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers