on Jul 22, 2016 at 2:45:46 pm Last Edited By Dada Kräuter on Jul 22, 2016 at 2:46:06 pm
I have one comp. named "Animation 1", inside it is one solid named "Opacity" and one comp. named "Text 1" which has an expression control merged to layer "Animation 1". I want to write script that will duplicate comp. named "Animation 1" and also it will duplicate everything what's inside and it will update expression and names. It must not be universal. It can be more specific, I mean that script will know exactly how many layers are inside Animation 1 comp.(To make it easier to write).
I'd duplicate the comp, rename it, then step through every property of every layer looking for expressions. For every expression found, I'd search and replace the expression text for the original comp name with the new one.
I am new in scripting and that's why I posted my question here. Below I wrote exactly what must this script do:
Duplicate layer named "Animation 1" and rename to "Animation 2".
Go inside in "Animation 2" and duplicate "Text 1" and "Media 1" and rename to "Text 2" and "Media 2".
Link "Text 2" expression to "Animation 2" not "Animation 1".
That's all. If I will learn how to do that, I will do it for more layers.
It must not be automatic, in script I will tell it which name must be duplicated and so...