Using ImageFormatSettings

I am new to python programming. I wrote a python script for blender that generates a sequence of images. The only step I cannot get to work is specifying the file names where the images will ultimately be saved. When I call

bpy.ops.render.render(write_still=True)

the image gets saved as “/tmp/.png”. How can I specify the file name and file type? I expect it has something to do with ImageFormatSettings. But its proper usage is beyond my python programming skills.

Any help is appreciated!

blender 2.62

import bpy
rd = bpy.context.scene.render
rd.filepath="/home/utente/file"

Great, thanks a lot!

  • Is it something one just knows by experience that such a thing can be accessed via “bpy.context.scene.render”, or is there a more systematic way to find out about this? The hierarchy of these python objects within blender is not quite obvious to me.