Can I add a layer in my comp at a specific index?

Hi, I explain my problem, I’m adding a last layer at my composition, but this one automatically go at the first index position, but I want it goes to the last ! How to do that ? I didn’t file in set Layer dropdown : set index.

I need this one “orangeshroom” goes to the end of the list

Thank you for your help :slight_smile:

Hi @LucieDevGirl , sorry for late reply

You can use a layer action called “move to end” - it moves the layer to the bottom in the order of the layers.

You can set a layer index only using an action, there are 4 actions for setting an index [ move to beginning, move to end move after, move before].

If you can’t find a specific property in the set line dropdown always check the action line dropdown too.

This is an example of this automation -

It’s important to note that in this example, we need to stop the loop. If we don’t stop it, the loop will continue to move each layer to the end, resulting in the same order of layers being repeated. This is because the first layer will be moved to the end, followed by the new first layer (which was originally the second layer), and so on. To avoid this, we should stops the loop after the first layer has been moved to the end.

Please let me know if you have more questions,

thank you very much. It helped and worked for 75% of my Items but I don’t know why : sometimes have this trouble :

It goes to the middle position , have you any idea why ?

I finally just update the if condition :

and it works ! But I still can’t explain why it didn’t work before haha

@LucieDevGirl I have no idea why it didn’t work either, but you found good solution!