6
$\begingroup$

I have a different render in all eight render buffer slots. In the UV/Image Editor there is an option to “Save All Images” but when I select it, nothing happens. How do I configure the save path and save all the images that are in all the slots in one operation? If "Save All Images" is not for the render buffer slots then what is it for and is it possible to do what I want to do? I am trying to discover if there is something quicker than selecting each slot and saving out the individual image.

$\endgroup$
9
$\begingroup$

save all images is for modified texture images, images that you have loaded from storage or packed in the .blend file and have been edited ,if no straight option is available you can use a script to automate that process . this script will save all non empty slots to the file path specified in the render tab and with the name displayed in the Image-editor and the number of the slot : "Render_Image_slot_1.png"

import bpy

scene = bpy.context.scene
path = scene.render.filepath
ext = scene.render.file_extension
for img in bpy.data.images :
    i = 0
    if img.type == 'RENDER_RESULT' :
        print(img.name)
        for i in range(8):
            img.render_slots.active_index = i
            try :
                img.save_render(path+img.name+"_slot_%d"%i+ext, scene)
                print("slot %d saved"%i)
            except :
                print("Slot %d is empty"%i)

in case you need this more then once here is the Addon file for download install it and you'll find the entry in UV/Image-editorImageSave_all_slots, you can assign a shortcut for it.

enter image description here

to install : enter image description here

$\endgroup$
10
  • $\begingroup$ The add-on for download is a blend file and not a python script? I opened the blend file but I don't see the "Save render slots" option. How do I implement the script exactly so that I can see what you show in the image? $\endgroup$ May 23 '15 at 18:35
  • $\begingroup$ @BrysonJack sorry my mistake I'll re-upload the file it is supposed to be a ".py" file, a minute $\endgroup$
    – Chebhou
    May 23 '15 at 18:37
  • $\begingroup$ @BrysonJack I have updated the link , if you still have problem comment $\endgroup$
    – Chebhou
    May 23 '15 at 18:44
  • $\begingroup$ I took the script above, made it a .py file, zipped it, installed it and confirmed it went into my add-ons directory but I still don't see the "Save render slots" menu. Weird. $\endgroup$ May 23 '15 at 18:44
  • $\begingroup$ @BrysonJack don't ZIP it install the directly, what version are using ( this is for 2.74 ) $\endgroup$
    – Chebhou
    May 23 '15 at 18:48
2
$\begingroup$

2.8x


bl_info = {
    "name": "Render slots",
    "author": "Chebhou",
    "version": (1, 0),
    "blender": (2, 80, 0),
    "location": "UV/Image editor > Image >Save render slots",
    "description": "Saves all render slots",
    "warning": "",
    "wiki_url": "",
    "category": "Image"}

#upgraded to 2.80 by BD3D :)

import bpy
from bpy.types import Operator


class save_slots(Operator):
    """Save render slots"""
    bl_idname = "image.save_all_slots"
    bl_label = "save render slots"

    def execute(self, context):
        scene = context.scene
        path = scene.render.filepath
        ext = scene.render.file_extension
        for img in bpy.data.images :
            i = 0
            if img.type == 'RENDER_RESULT' :
                print(img.name)
                for i in range(8):
                    img.render_slots.active_index = i
                    try :
                        img.save_render(path+img.name+f"_slot_{i}"+ext, scene=scene)
                        print("slot %d saved"%i)
                    except :
                        print("Slot %d is empty"%i)

        return {'FINISHED'}



def add_object_button(self, context):
    self.layout.operator(
        save_slots.bl_idname,
        text="Save render slots",
        icon='FILE_IMAGE')

def register():
    bpy.utils.register_class(save_slots)
    bpy.types.IMAGE_MT_image.append(add_object_button)

def unregister():
    bpy.utils.unregister_class(save_slots)
    bpy.types.IMAGE_MT_image.remove(add_object_button)

if __name__ == "__main__":
    register()

```
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.