I am trying to render and save multiple images through python script in blender. I know how to render and save the image through the Blender GUI but I want to do it all through my script since I am using a set of nested loops and need to save multiple images. I am able to render the image and I guess save the image with the output being successful. But I am not sure where it saves to and when I try to edit the filepath it gives me the error of the context being incorrect.
解决方案
Here's what I've done in Blender 2.81a:
bpy.context.scene.render.filepath = '/home/user/Documents/image.jpg'
bpy.ops.render.render(write_still = True)
This code creates a "VR panorama" (a series of pictures of an object, from different perspectives around it).
I ended with this algorithm:
create or load an object you are going to take pictu