I'm trying to render surface normals for my scene, and I've gotten it to work in Blender 2.78. One of the important steps was to eliminate the gamma correction which was whitening the image. I did this in 2.78 by doing
scene.view_settings.view_transform = 'Raw'
Unfortunately I also need this to work in Blender 2.69, but I can't find the appropriate setting as the 'Raw' enum was introduced after 2.69.
I've tried setting it to 'NONE' (which the Blender 2.69 API lists as an option) but this throws an error saying that the only option is 'Default'. I've also tried directly setting
scene.view_settings.gamma = 0.0
But this has no effect.
Update: Thanks for your answer, Troy. Ultimately I'm trying to create a png image with the surface normals that I'll use for another task. This other task needs me to remap the colors of the surface normals (to look like this: https://arxiv.org/pdf/1411.4958v1.pdf).
I'm definitely open to using another path to producing normals, but I need to use only Python scripting.
Non-color Data sounds promising. Would I be able to render something using nodes, and then save that render (from an output node, not from the RenderLayer) as
Non-color Data? Please let me know if I'm not being clear!
Update 2: Thanks, Sambler. When I set
scene.display_settings.display_device = 'XYX' I get
TypeError: bpy_struct: item.attr = val: enum "XYZ" not found in ('sRGB').
Trying to change
scene.display_settings.display_device = 'sRGB' scene.view_settings.view_transform = 'Raw'
TypeError: bpy_struct: item.attr = val: enum "Raw" not found in ('Default')
This question seems pertinent. In this question the solution was to reinstall Blender. As I'm working on a shared cluster, to ask the admin to reinstall Blender in order to help me debug is, ideally, a last resort.