Layer sequential name

Hey,

I"m trying to create an automation where I have the user select the number of copies of a created element (in this case, a solid). Then I wanted to have the automation create the number of copies that were requested, naming them sequentially. I’m clearly doing something wrong, as if I have the automation only create one copy, it doesn’t rename the layer properly. If I have it create more than one copy, it sometimes names the original properly, but doesn’t name the others properly and doesn’t give me the right number of copies. I’m sure it’s something with order of operations or something, but I can’t figure it out. Any help would be greatly appreciated!

I’ve attached what I’ve come up with so far.

Thanks!
Add progressing number to layer title.json (18.7 KB)

Hi @skimber,

i changed it quite a bit, here are the steps -

  1. save the name variable for the start of the name of the layer.
  2. loop over the layers in the active composition and ask for the amount of copies + save the composition as a variable. (exactly as you did)
  3. loop “custom amount of time” based on the number of copies the user typed.
  4. add solid with the name of “Solid” (the name is not important, we can identify the new layer by its index, every new layer will be added at index 1 the top of the composition).
  5. create a text variable for the number of the layer, you need this variable so if the number is less than 10 you will convert it to “01”, add “0” to the beginning. set this number to the index of the loop.
  6. if the index of the loop is less than 10 - set the number variable to “0” + itself. (so 1 will become “01”)
  7. loop over the layers in the active comp and find the first layer by it’s index (1) and set the name of this layer to the name variable + space + number variable. (then you can stop the loop too)

Download -
Add progressing number to layer title v2.json (15.3 KB)

Thanks,
Alon

Thank you so much! I wasn’t able to mess around with it yesterday, but I’ll take a look today. I really appreciate your help!