3

I have 10 layers all filled up, and i need content from layer 5-10 to be moved to layers 11-16, as i need more layers in-between.

Is there a shortcut or add-on for this or do i need to go through all layers and move the content one by one?

Artmole
  • 691
  • 1
  • 8
  • 14
  • Possible duplicate of http://blender.stackexchange.com/questions/852/how-to-copy-objects-to-another-layer?rq=1 – iKlsR Nov 03 '15 at 11:35

3 Answers3

3

I don't know of any add-on that specifically has a bump up by n layers feature, Blender has a massive eco-system for add-ons. Sometimes it's easier to write a small script than to go looking for an add-on.

Here a small script that moves all items that appear in layers {5,6,7,8,9} up by 5 layers to {10,11,12,13,14} respectively. (I think you accidentally gave an example that is off by one)

enter image description here

You may want to test how this works in a small dummy .blend file, so you are confident using it in a production scenario.

paste this directly into the TextEditor and press Run.

import bpy

for obj in bpy.data.objects:

    # let's deal with a simple case: is it only on one layer?
    if obj.layers[:].count(True) == 1:
        found_index = obj.layers[:].index(True)
        if (5 <= found_index <= 9):
            new_index = found_index + 5
            obj.layers[:] = [i==new_index for i in range(20)]
zeffii
  • 39,634
  • 9
  • 103
  • 186
2

Here is my version of a script to do this:

import bpy


def shift_layers(obj, src, dst):

    for i in range(len(obj.layers)-1, dst-1, -1):
        obj.layers[i] = obj.layers[i-dst+src]
    for i in range(src, dst):
        obj.layers[i] = False


for obj in bpy.data.objects:
    shift_layers(obj, 5, 10)
Mutant Bob
  • 9,243
  • 2
  • 29
  • 55
0

Since Blender allows objects to be in more than one layer, you could: 1) Activate just layer one 2) Type A (select all visible) 3) Shift right click the layer where you want to move stuff 4) Right click layer one, to remove selection from it.

Repeat steps to other layers...