blender/doc/python_api
Benoit Bolsee 4213eca5fc BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender.
2 new attributes to ImageViewport and ImageRender object:
depth: set to True to retrieve the depth buffer as an array of float
       (not suitable for texture source).
zbuff: set to True to retrieve the depth buffer as a grey scale pixel array
       (suitable for texture source).

A new mode 'F' is added to VideoTexture.imageToArray() to allow returning the image
buffer as a one dimensional array of float. This mode should only be used to retrieve
the depth buffer of ImageViewport and ImageRender objects.

Example:

viewport = VideoTexture.ImageViewport()
viewport.depth = True
depth = VideoTexture.imageToArray(viewport,'F')
# show depth of bottom left pixel
# 1.0 = infinite, 0.0 = on near clip plane.
print(depth[0])
2012-10-20 22:28:44 +00:00
..
blender-org fix [#28151] export OBJ don't save the extension 2011-08-03 05:32:07 +00:00
epy hide overly picky warnings from 'pylint' for pep8 script, indentation edits. 2011-11-19 16:17:35 +00:00
examples * Fix small bug in Python operator example; improved example of modal operator 2012-10-12 18:19:39 +00:00
rst BGE VideoTexture: add depth buffer access to ImageViewport and ImageRender. 2012-10-20 22:28:44 +00:00
sphinx_changelog_gen.py api changelog for 2.64 and 2.63 (which I missed last release) 2012-10-09 01:07:08 +00:00
sphinx_doc_gen.py style cleanup: pep8 2012-10-08 10:03:01 +00:00
sphinx_doc_gen.sh minor fixes 2012-06-11 12:13:41 +00:00