Copy link to clipboard
Copied
Hello,
I'am totally new to scripting for AE and this is my first post here.
I have a Composition containing 7 other comps with text. And I got this text in 5 different languages. Plus there are in total 5 Comps with 7 Textcomps each wich are needed in 5 different languages. I could go by hand and replace the 5*7*5 Comps via drag drop. But I am hoping that you can help me with a less painful solution.
The names of the compositions are like EN_compname1 or IT_compname1. What I would need, is a script thats asks for the first two letters and then replace the compositions. I already googled, crawled through aescripts.com and searched this forum, but I couldn't find a hint that would help me.
Can you?
Copy link to clipboard
Copied
I doubt that there's an existing script that does exactly what you want. The good news is that it sounds pretty straight forward and not a bad scipt to tackle as a first script if you have some time.
Basically, you need to:
Dan
Copy link to clipboard
Copied
WARNING, WARNING, WARNING: I suggest testing this on a DUPLICATE of your aep project file first, just in case.
If you are simply trying to swap one precomp for another and the naming structures are IDENTICAL with ONLY the first two letters changing, like this...
Old:
MAIN COMP1 > EN_compname1
MAIN COMP2 > EN_compname2
MAIN COMP3 > EN_compname3
New:
MAIN COMP1 > IT_compname1
MAIN COMP2 > IT_compname2
MAIN COMP3 > IT_compname3
Try this out. It will search every layer in your entire project for your chosen language ID ("EN", "IT", "FR", "DE" or "JP"). If you need different names let me know and I will update it for you.
Message was edited by: David Torno (fixed broken link)
Copy link to clipboard
Copied
Have you tried the True Comp Duplicator? http://aescripts.com/true-comp-duplicator/
Copy link to clipboard
Copied
Sorry for the huge delay.
We ended up, not replacing comps but instead created the texts in different languages as PNG out of the existing webGL animation and only replacing the sourcepaths in the AEPX File.
items = aepx.find("/ae:AfterEffectsProject/ae:Fold/ae:Item")
for item in items
reference = item.find("./ae:Sfdr/ae:Item/ae:Pin/ae:Alas/ae:fileReference")[0]
reference.attr("fullpath", myPath)
aepx.save()
(pseudo script)
@Dan @David
Thank you for your help. Now i know a bit more about scripting. But in this case the XML Replace Method is easier and quicker. Said my programming colleague.
@Lloyd
Yes, i tried the TCD - but would have only done part of the job. But thx anyway.
Copy link to clipboard
Copied
We also have a script that will batch process a folder full of projects and
search an replace paths:
http://aescripts.com/batch-search-n-replace-paths/
Lloyd
Find more inspiration, events, and resources on the new Adobe Community
Explore Now