Python Render Specific Frames I'm new to blender scripting and with the api change in 2.56 I'm having difficulty finding relevant information. I'm trying to render 8 non-consecutive single frames to pngs. They are the same scene and camera, I'm just trying to get different angles of an object for creating sprites for a game. I found this tutorial but it's out of date.

I hate to ask for code because it's almost going to be the whole script, but it would be apreciated. I would be just as happy with a some direction on getting started though.
Try setting the frame and then rendering it.


bpy.ops.render.render() is an operator which renders the current scene.
bpy.context.scene.frame_set() is an operator which sets the scene frame.


Here is a simple example:

import bpy

scene = bpy.context.scene
fp = scene.render.filepath # get existing output path
scene.render.image_settings.file_format = 'PNG' # set output format to .png

frames = 5, 9, 17

for frame_nr in frames:

    # set current frame to frame 5
    scene.frame_set(frame_nr)

    # set output path so render won't get overwritten
    scene.render.filepath = fp + str(frame_nr)
    bpy.ops.render.render(write_still=True) # render still

# restore the filepath
scene.render.filepath = fp