[Bf-python] Fastest way for RenderEngine to return combined rgba + z

Brecht Van Lommel brechtvanlommel at pandora.be
Sat Feb 2 14:14:39 CET 2013


On Fri, Feb 1, 2013 at 10:29 PM, Asbjørn <lordcrc at gmail.com> wrote:
>> There is already a trick that you can use, it didn't work entirely
>> before but I just committed a fix for that. Basically you use the
>> foreach_set method which accepts a buffer object:
>> http://www.blender.org/documentation/blender_python_api_2_65_9/bpy.types.bpy_prop_collection.html?highlight=foreach_get#bpy.types.bpy_prop_collection.foreach_set
>
> This looks very interesting indeed. Which revision will I need for this
> to work?

Revision 54253 or newer.

> Thanks for the help and example!
>
> PS: there's a typo in the API example you linked to above, the seq and
> attr parameters seems to be switched in the collection.foreach_set call.

Thanks for pointing out, I see Campbell just fixed it.

Brecht.



More information about the Bf-python mailing list