Been working on a py_buffer method for pixel access ( http://www.pasteall.org/12868/diff) and can't seem to figure out where it goes wrong.
It appears to work... >>> import bpy >>> img = memoryview(bpy.data.images['Lenna.png']) >>> img.format 'B' >>> img.itemsize 1 >>> img.shape (512, 512, 3) >>> img.ndim 3 >>> img.strides (1536, 3, 1) but when trying to access pixels... >>> img[0][0][0] Traceback (most recent call last): File "<console>", line 1, in <module> IndexError: invalid indexing of 0-dim memory This whole thing is driving me batty since there's very little info on the py_buffer method on the web. _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers