# Python Save MultiLayer EXR BUG?

I am currently writing a script that should render out each render layer via:

bpy.ops.render.render(layer=“InsertRenderLayerNameHere”)


and then save the resulting image. The problem is that when I do:

bpy.data.images[“Render Result”].save_render(“InsertFilePathHere”,scene=bpy.data.scene[0])


and I have the scene file format set to OpenExr Multilayer, the image still only gets saved as a normal/flat openexr file. This is probably a bug right?

The even weirder thing is that then I open a OpenExr Multilayer file in Blender and then go:

bpy.data.images[“OpenExr_Test_File.exr”].file_format


python outputs : “’PNG”

• Hello, is there any update on this ? If the question is unanswered, should I start a new one instead ? – Jonathan Chemla Sep 28 '15 at 8:18
• hi jonathan, sorry for the late answer. I think the only workaround I found at that time is to write the image to disk while rendering: bpy.ops.render.render(write_still=True). I currently don't have the time to look into it further, sorry :( – Luca Scheller Oct 3 '15 at 14:48
• No worries, I've found a workaround in Python as well : Use the File output Node, and addinputs if yo uneed a multilayer EXR. Adding this as a suggested answer. – Jonathan Chemla Oct 5 '15 at 6:57

renderlayers_node = scene_tree.nodes.new('CompositorNodeRLayers')