ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Duplicating Comp and replacing text and image

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Justin Giudici
Duplicating Comp and replacing text and image
on Nov 18, 2017 at 1:47:42 pm

Hey everyone,
I have a project that I need to display 50 products with an image and text. I was wondering if anyone knew of a script or way to be able to this without creating each comp manually. So the way I was thinking it working was import all the images into AE then run a script that creates a new comp from the image name, updates the image and text to match the file name. I was looking into dipping my toe into trying and scripting this but wanted to see if a solution was already available. Thanks for the help.


Return to posts index

Dirk de Jong
Re: Duplicating Comp and replacing text and image
on Nov 18, 2017 at 3:17:21 pm

This isn't exactly what you're asking for, and it's possible something more like what you're asking for exists - and I'm pretty sure that's all possible through scripting (to be able to build the same comp around a chosen source file) - but you might want to take a look at this script (True Comp Duplicator) ; https://aescripts.com/true-comp-duplicator/

This script allows you to duplicate a comp while also duplicating all the files included in the comp so that the new copy is truly independent from the original comp in terms of its dependencies. And it offers useful controls for how deep (in terms of precomping etc.) to make the files "true duplicates" I bought it a few years ago (suggested price $25) and it kind of revolutionized my workflow for creating in AE. Like many users probably do, I end up with comps with at least a few levels of precomps, and when a creation is at a point where there is more than one promising direction it could go in it's really useful to be able to make a truly independent copy to "branch" it off on its own.

In your case once you had built the comp once with a specific image, you could do a True Duplicate with the script, and then replace the image in the dupe (option drag from the project window onto the original in the timeline or Replace Footage command in the comp window) and type in the new text... But I wouldn't be surprised if there is already a script (or maybe even expression) that could use a file name as the Source Text param value for a text layer


Return to posts index

Dirk de Jong
Re: Duplicating Comp and replacing text and image
on Nov 18, 2017 at 3:29:01 pm

[Dirk de Jong] "I wouldn't be surprised if there is already a script (or maybe even expression) that could use a file name as the Source Text param value for a text layer
"

Fiddling around I just confirmed that if you apply this expression to the text layer's Source Text parameter (which you could do in the original copy of your comp)
txt = thisComp.layer(2).source.name;
It would display the source name of the 2nd layer (counting from top down) in the comp - change the (2) to (3) for the name of the 3rd layer, etc.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]