Blender writes render even when there is no composite node?

I am new in Blender and I would like to know what is best workflow for creating output to many files and compose in AfterFX or in Blender Composer.

I know that I can render from Blender finished composed frames, but it is not ideal, because if you want change color correction or DOF you have to rerender whole frame :( So much better is render it to PNG, EXR ... and compose later.

I discovered that best option is don't use Compose node, but only File Output. But there is some hidden compose node, which save my render together with File Output, so I have to delete this files (I named it null). I can rerender only some layers and let others unaffected. But maybe there is better workflow ... thanks for tips.

I also reported this behaviour and Sergey added this to TODO list: Report

Sorry for my english :)

• I think this just the way it works currently. :/ (I have noticed this too). It would be fairly easy to write some python script to delete the files automatically.
– gandalf3
Feb 18 '14 at 20:37
• I think OP wants to use the z-pass for DOF. Using the z-pass and post-pro you can easily change the DOF. Whereas if you render out a flattened image you would have to render the entire thing over. Feb 18 '14 at 20:39
• There are couple hacks/solutions you could try, such as: 1. Set the scene output to a separate directory so it is easy to delete the extra files. 2. Use only the composite node with multilayer EXR to store all the passes. 3. Use a combination of the scene output/composite node and file output nodes. Would any of these work for you?
– gandalf3
Feb 18 '14 at 20:44
• gandalf3: 1) yes this is what I am doing. 2) use composite node is dangerous, because when I rerender only one another layer, I lost my layer with composite node which was fine. EXR multilayer looks good, but slow for loading and I have to rerender all. 3) same as 2). Thanks, I thinked that there is some better workflow, it looks that File Outputs and redundant Properties Output is best solution. Hope that developers change it :) Feb 18 '14 at 21:40

As gandalf3 said, I think the best way for now is to delete the files automatically with some python script. Just make sure that the scene output goes to it's own directory, so you don't delete any other files. Run the script and render.

import os
import glob
import bpy

def delete_garbage_files(scene):
out_path = bpy.path.abspath(scene.render.filepath)
out_dir, _ = os.path.split(out_path)

# Remove all files of the currently selected output format.
ext = scene.render.file_extension
for f in glob.glob(os.path.join(out_dir, "".join(("*", ext)))):
os.remove(f)
print("Deleted: {}".format(f))

# Also delete the directory.
try:
os.rmdir(out_dir)
print("Deleted: {}".format(out_dir))
except OSError:
print("Didn't delete directory {}, probably not empty".format(out_dir))

# Post render handler, to delete the files after every rendered frame.
bpy.app.handlers.render_post.append(delete_garbage_files)


To delete the files after the whole render job finishes, you can use render_complete instead of render_post But if you cancel a render, the files won't be deleted.

# Complete render handler, to delete the files when the whole render job
# is finished.
bpy.app.handlers.render_complete.append(delete_garbage_files)


Probably the best solution is to use a render_cancel and render_complete handler. Then the files will only be deleted when the render is finished or canceled and not after every rendered frame.

# Use both cancel and complete render handlers.
bpy.app.handlers.render_cancel.append(delete_garbage_files)
bpy.app.handlers.render_complete.append(delete_garbage_files)


If you want to automatically delete the 'garbage' files the next time you open the file and render, you should have the name of the script end in '.py' and check the 'register' option:

• Just realized you also have a render_cancel handler. Updated the answer to reflect this. Feb 19 '14 at 14:46

*** Edit this DOES NOT WORK !!! the files will still be written but in the Blender installation folder.

The post is old but just to let others know, I have a better and simpler solution, simple erase the file path in output under the render configurations. I also have the composite node in my node graph and still works.

works with blender version 2.76.