ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Looking for a script to replace text in text layers from a file

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chad SpecterLooking for a script to replace text in text layers from a file
by on Nov 8, 2012 at 4:54:38 pm

Hello All,

Hopefully someone has some suggestions. I have a project I set up for a client that needs to be easily customizable for each of their series. It has a ton of text layers which will each need to text replaced. I figured it would be easiest to offload this to an easily editable text file and automate the customization process. I got it working using an expression, but since the project will be handed around a lot, and expressions don't handle relative file paths, I'm thinking a script will work better.

So far I have not found a script that will do exactly what I'm looking to do. compsfromspreadsheet is close to what I'm looking for, but my project is far too complex, with many subcomps, to go the duplication route. Instead I just want to replace the text, no duplication. I've also looked at cggreen's crg_Text_from_File, but I need it to target specific layers based on the text file and not just load all the text into one comp.

I need something like this:

1) Let me select an external text file
2) Replace the text in specific layers in the project based on data in the file

Ideally I could also do the following as well.

3) Replace an image file in specific layers in the project based on the file

This would be a one time process. Duplicate the file, run the script, (fix the problems), render.

Any ideas? I'm not the best scripter, but can probably cobble something together if I can get pointed in the right direction.


Return to posts index

Joseph W. BourkeRe: Looking for a script to replace text in text layers from a file
by on Nov 8, 2012 at 5:31:25 pm

Chad -

You might want to take a look at this one on AEScripts:

http://aescripts.com/compsfromspreadsheet/

It might do the trick - there may be others on the site, so poke around.

Joe Bourke
Owner/Creative Director
Bourke Media
http://www.bourkemedia.com


Return to posts index

Chad SpecterRe: Looking for a script to replace text in text layers from a file
by on Nov 8, 2012 at 5:40:29 pm

Yeah. I checked that one out. Close, but no cigar. It duplicated the comps you are targeting. My project is too complicated for that. I'd prefer to just replace the text is targeted layers.

This is promising: External File References - After Effects form Ryan Ragle. He created a way to set the path to a file in a project, then is referencing the file via expressions. A little clunky, since you need to set up the text in it's own precomps, butI might try using his method. Though I still think a scripting solution would be better.


Return to posts index


yotam monkRe: Looking for a script to replace text in text layers from a file
by on Jan 10, 2013 at 10:07:14 am

hi chard
i am dealing with a similar problem now
did you solve it?


Return to posts index

Chad SpecterRe: Looking for a script to replace text in text layers from a file
by on Jan 10, 2013 at 3:40:27 pm

I ended up using a couple techniques. First I set up all the text using this method:

http://www.ryanragle.com/index.php?/site/comments/external_file_references_...

A little funky, but it worked well in the end. I ended up with a text file that was pretty easy to change and I could hand that off to a producer to fill in all the new text.

Then I used this script to change out images in the project: http://www.digitaldistortion.net/resources/scripts/AE/DS_autoreplace_footag...

Basically I added an code to the beginning of each image I wanted to switch out, then you add that code to the beginning of the new images, you run the script and tell it to only look at the first X characters and it will automatically replace them in the project. Have to make sure the new images are the same pixel size as the old ones though. This was a little funkier to do as you have to go into the project, select images and run the script, but still faster than changing them out by hand.

Works like this:

Original images in project
ABCD1_old_image_name1
EFGH2_old_image_name2
IJKL3_old_image_name3
....

Change to these images in a folder
ABCD1_new_image_name_1
EFGH2_new_image_name_2
IJKL3_new_image_name_3
....


Return to posts index

Daniel MarquezRe: Looking for a script to replace text in text layers from a file
by on Feb 9, 2015 at 12:38:26 pm

Hello, I write you because I need your help about the script you named where from excel file you can "obtain" text, mp3, graphics....

I renambered it to .jpx so I can run the script file from the spreadsheet but I obtain strange results.

I only need to have a template and a text object (^name) where I can write the content in the object.

I am in a really need of your help

daniel.diez@gmail.com


Return to posts index

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