[Bf-committers] bpy.Image memoryview problems

Theo de Ridder theo.de.ridder at planet.nl
Tue May 4 11:06:15 CEST 2010


On 4 mei 2010, at 08:13, Campbell wrote:

> class Image(bpy_types.ID):
>    def buffer_get(self, type="byte", frame=None):
>        return None # replace with ctypes/buffer stuff.
> 
> After this you can do..
>  buffer = bpy.data.images["foo"].buffer_get()

I tried this, by adding those lines in the bpy_types.py module within
the blender2.5a2 on OSX, but 'buffer_get' remained an unknown attribute,
also 'as_pointer' was unknown.
and when it works is it possible to find the needed info for ctypes through
introspection, or do you need to search for the structure layouts in de sources?

~Theo




More information about the Bf-committers mailing list