0
$\begingroup$

I wrote this code to save the render buffer:

bpy.ops.render.render(scene="Scene")
bpy.data.images['Render Result'].save_render('D:\\render.png')

But it doesn't work if I have a stereo camera.

Generally, if I click on Image > Save As Image Blender saves both the images adding _L and _R suffix to the filename if the Stereo 3D is enabled.

Some suggest on how to solve?

$\endgroup$

1 Answer 1

1
$\begingroup$

If you want to save the render result you can simply use the keyword argument write_still = True.

The saved image will conform to your view format settings in the render options panel. If you set the view format to Individual, the following lines will save two images named render_L.png and render_R.png.

bpy.data.scenes['Scene'].render.filepath = 'D:\\render.png'
bpy.ops.render.render(write_still=True)
$\endgroup$
2
  • $\begingroup$ It works. Actually I prefer to use filenames different from the one blender use to save the rendered files....but I could use it as a temporary solution. Thanks for the suggest binweg! $\endgroup$
    – Loki
    Mar 8, 2017 at 11:50
  • 2
    $\begingroup$ The suffix is defined in Render Layers > Views > File Suffix, you can edit that... @Give_me_back_Softimage_bastard $\endgroup$
    – brockmann
    Mar 8, 2017 at 11:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .