[Bf-python] Cython, cycles and makesrna

Dan Eicher dan at trollwerks.org
Mon May 16 18:08:56 CEST 2011


On Mon, May 16, 2011 at 1:36 AM, Brecht Van Lommel
<brechtvanlommel at pandora.be> wrote:
> Hi,
>
> I'm not familiar with Cython, but it could be indeed be useful to
> addon developers. I guess from the Blender side this doesn't need much
> work, seems this can wrap any header file?
>
Yeah, I did my first blender/cython test by converting my pie menu
script to use 'direct' opengl calls instead of bgl for a nice speed
boost. It can even mix python and c calls in the same function and
compile/run it with no problems.

After playing with it a bit more it would probably be sufficient to
just wrap RNA_blender.h -- and perhaps generate a cython wrapper like
the RNA_blender_cpp.h one (even though this would kind of directly
compete with bpy) that other cython modules could just cimport without
having to go through the C-py-C conversions.

The only real changes to blender's code base are for
generating/writing the wrapper files.

Dan



More information about the Bf-python mailing list