Copy link to clipboard
Copied
Hi everyone,
I am pretty new with AE, I want to ask if there is an expression, which would let me duplicate selected layer?
I want to use expression, because I have to use like, 30 layers of same object, only with some position and rotation offsets.
THank you.
Copy link to clipboard
Copied
There is no such thing. Expressions cannot genmerate any layers or other items. That's what scripts would do. At best you could rig expressions that manipulate the transform properties, but you'd still have to duplictae the layers manually. Anyway, without better info nobody can tel lyou what you might actually need. Such unspecific questions are pretty useless.
Mylenium
Copy link to clipboard
Copied
Probably your best bet is to select the layer you want. Go to Edit > Copy with Property links. Then duplicate the layer and with it selected, go to Edit > Paste. This will create “live“ linked expressions from one layer to the other. Then you can just manually duplicate the layer till you have the number you need. Using Commd/Ctrl D to duplicate is very quick and easy 🙂
Copy link to clipboard
Copied
You may want to check out this plugin. It does that and much more.
Copy link to clipboard
Copied
Although you cannot create layers using expressions, you can duplicate layers that have an expr that will adjust the position based on the location of the previous element.
This expr will make your duplicate shift 50px away from the previous. Adjust the x=50 to your desired px space.
Position:
x=50*(index-1);
[value[0]+x,value[1]];
You can do the same expr using the "y" value to move it down. Use Both together to shift and drop.