[ADDON] Copy Render Layer

As probably many of you noticed it’s impossible to copy render layer.
Sometimes we would like to make a copy of existing render layer and change only one or two settings.
In this case we have to add new render layer and set all of the parameters from scratch, which can be annoying, as almost all has been previously set in one of the existing render layers.

Here’s a little Add-On that makes it possible to Duplicate, Copy and Paste active render layer or all render layers:

Link to wiki:


How to use:
Currently we have 4 buttons available:

“Duplicate”: Duplicates selected render layer
“Copy”: Copies selected render layer to clipboard
“Copy All”: Copies all render layers of active scene to clipboard
“Paste”: Pastes render layers from clipboard to active scene.

It works across scenes in the same file as well as between files.
If you want to Copy/Paste render layers between files do this:
“Copy” or :Copy All", then open the destination file and hit “Paste”

All of the render layers will be pasted to current scene of opened file.

If any of copied render layers had “material override” or “light override” and such material or light group doesn’t exist in destination file - it simply won’t be pasted and warning in info panel will appear.

I have not yet needed your script, but what I learned is well very much interesting:
Miss using the toolshelf :wink: and how to do that so very easy, defining the button!

def register():
#    bpy.types.RENDER_PT_layers.prepend(button)

Thank you!

Hi Bartek,

here is an alternative doit

def doit():
    #Active Render Layer
    a = bpy.context.scene.render.layers.active
    a_name = a.name
    #add new Render Layer
    b = bpy.context.scene.render.layers.active
    #Copy attributes from original
    for key in a.bl_rna.properties.keys():
        cmd = "b.%s = a.%s" % (key, key)
            print("ERROR", key)
    b.name = a_name + "_COPY"
    return {'FINISHED'}

Uploaded add on to blender’s uploads. Check first post of this thread for current version.