I'd like to create a picture in blender and save it as a 32 bit exr.
import bpy # in case of re-runnign this code, # get the old 'foo' image out of the way if 'foo' in bpy.data.images: bpy.data.images['foo'].name='bar' #create an HDR image with name 'foo' bpy.ops.image.new(name='foo', width=512, height=512, alpha=False, float=True) #find the image with name 'foo' image=bpy.data.images['foo'] # set it up for saving an exr HDR image image.filepath_raw = '/tmp/foo.exr' image.file_format = 'OPEN_EXR' # TODO here: image.save_as_32_bit=True (instead of 16) #save image to disc image.save()
The above code makes 16 bit exr according to imagemagick.
I want to use
bpy.ops.image.save_as somehow from python, in conjuction with this code, to emulate the behaviour of
Image->Save as Image with the option
[Float (Full)] rather than
The Save as dialogue points to a thing called
ImageFormatSettings. Where can I supply this in python?