[Bf-python] Inserting a slice into RenderPass.rect
Brian Savery
brian.savery at gmail.com
Tue Feb 2 23:31:08 CET 2016
Working on a RenderEngine addon. When rendering I'd like to update a
region of the render result (say if I want to update the first scanline of
pixels).
On the face of it RenderPass.rect is simply a list of 4 float items (list
of rgba value).
https://www.blender.org/api/blender_python_api_current/bpy.types.RenderEngine.html
I can do
layer.rect = [[1.0, 0.0, 0.0, 1.0]] * pixel_count
However replacing a slice of that rect:
layer.rect[100:200] = [[1.0, 0.0, 0.0, 1.0]] * 100
gives an error:
TypeError: a float is required
Not sure what's going on here?
--
brian.savery at gmail.com
508-274-8700
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20160202/812dff4e/attachment.html>
More information about the Bf-python
mailing list