ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Script for comp. duplication

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Dada KräuterScript for comp. duplication
by on Jul 22, 2016 at 2:45:46 pm
Last Edited By Dada Kräuter on Jul 22, 2016 at 2:46:06 pm

Hello, :)

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).

Can you give me any advice or examples?

P.S. I don't want "True comp duplicator"


Best regards,

Return to posts index

Walter SoykaRe: Script for comp. duplication
by on Jul 23, 2016 at 10:16:51 am

What part of this are you getting stuck on?

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.

Have you read the scripting guide?

Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]

Return to posts index

Dada KräuterRe: Script for comp. duplication
by on Jul 23, 2016 at 12:35:51 pm

Hello, thank you for your reply, :)

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...

Thanks again!

Best regards,

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2016 All Rights Reserved