[Bf-python] Getting started with game blender python

Toni Alatalo antont at kyperjokki.fi
Fri Mar 4 08:25:04 CET 2005


On Thu, 3 Mar 2005, Nick Winters wrote:

> however, meshes can be modifed in the game engine using a different
> api... but new faces/verts cannot be made [and it is much harder to
> deal with the connections of the verticies iirc]
> http://www.blender.org/modules/documentation/pydoc_gameengine/PyDoc-Gameengine-2.34/KX_GameObject.KX_GameObject-class.html#getMesh
> http://www.blender.org/modules/documentation/pydoc_gameengine/PyDoc-Gameengine-2.34/KX_MeshProxy.KX_MeshProxy-class.html

interesting, didn't see that before - is that some post 2.25 addition, or 
did i just miss that?

> I belive armatures can be posed as well, but I have been unable to
> find the api for that.

the standard way is to use pre-animated actions via the Action actuator.

however, there is the setChannel() method for bones, which gets a 4x4 
matrix, which you can do to move bones freely in the game engine and 
hence deform the mesh more freely.

one recent post about that is 
http://www.blender.org/modules.php?op=modload&name=phpBB2&file=viewtopic&t=3202&start=30

and i guess this there is from the doc somewhere:

---
setChannel(channel, matrix, mode=0)
Parameters:
channel - A string specifying the name of the bone channel.
(type=string)
matrix - A 4x4 matrix specifying the overriding transformation as an 
offset from the bone's rest position.
(type=list [[float]])
mode - True for armature/world space, False for bone space
(type=boolean)
---

~Toni




More information about the Bf-python mailing list