[Bf-python] questions about python sub-interpreters, merge of bpy and gamepy

maci_ray maci_ray at yahoo.de
Wed Sep 10 20:22:17 CEST 2003


Hi Willian and Thomas,

sorry for writing back late, also.

 --- Willian Padovani Germano <wgermano at ig.com.br> schrieb:

> From: "Thomas Dyar" <tdyar at MIT.EDU>
> > I would like to change the way the game engine python is initialized from
> > within blender (embedded). I think it should be started as a
> > sub-interpreter so that the currently running scripts can still run when
> > the game finishes. Will this cause major problems?

> While working on this I saw what the game engine prep code does (closes
> current process, start a new one).  And I agree that it doesn't need to be
> done this way.

> Being adventurous: you may want to investigate if we can join both sets of
> Blender modules (normal and game) in a single environment.  I have no idea
> if this would work, though.  The original programmers wanted this, but for
> some reason didn't do it.

I think it would cause a lot of problems when game-engine scripts will
stay running after end, or did you ment static scripts running while
gameengine starts?

Remind that the game objects only do exist from start of the engine till
it's end.

I took some experiments with a slighly modified bpy. In
BL_KetsjiEmbedStart.cpp I modified the call to BPY_start_python() with
a flag indicating bpy runs in a game mode. With this flags only the
modules I needed (that should be tested and be game engine proven) were
initialized. Some special functionality is enabled, also, real mesh
replacement that I really needed. Maybe we should investigate further
on this...

Don't forget the _completely_ different approches of implementation
of the APIs.

BTW: I also found I some information about gameengine/gameengine python
and stuff. So if you have questions, maybe I can help.

Some references:
http://www.blender.org/modules/bc2002/Erwin/architecture/ketsjiintro.htm
http://www.python.org/doc/PyCPP.html

Maci_Ray.


__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de



More information about the Bf-python mailing list