[Bf-committers] Gameengine - ODE and Python
Willian Padovani Germano
30 Jul 2003 17:57:09 -0300
On Wed, 2003-07-30 at 07:47, maci_ray wrote:
> As mentioned I decided to bring real Mesh updates to gameengine (that is
> what I need most, and what started this thread). For now I clone the NMesh
> and Image Module from BPY. Later, when I found the interferences between
> BPY and gameengines' C++ Python encapsulation way, BPY can directly be used.
> In older gameengine there were AFAIK some dictionary juggeling alorithms.
A comment: there's an old thread in the python forum at www.blender.org
where Michel and a couple of ex-NaN guys discuss about bpython. From
what I remember, there's mention there that currently bpython and the
gameengine run separate instances of the Python interpreter, but the
goal would be to use a single instance for both. I didn't properly look
at the gameengine embedding yet.
But if the current NMesh, Image, etc. modules suit your needs, you
probably only have to register them with the Interpreter instance used
by the gameengine. Take a look at source/blender/python/ , files:
- BPY_interface.c: void BPY_start_python(void)
- api2_2x/EXPP_interface.c: void initBlenderApi2_2x (void)
- api2_2x/Blender.c: void M_Blender_Init (void)
> A question is: Should the replaced mesh appear in blender also (like my old
> version which used NMesh directly) or is it just for gameengine?
If you use add_mesh() it will be in Blender, but will only appear in the
scene you link its object to. So it's your choice where to let it be
seen, if I understood what you want.
> > What about suggesting the gameengine as one of the topics for next
> > Sunday's irc meeting?
> Why not. It's on 16.00 CET I think?
Yes, that's it.