Galileo looking through a telescope

Find-n-replace for AE

This is a tool for finding and replacing text in expressions, layer names, property names (the ones that can be renamed) and text content. It can use javascript regular expressions to do the job, so you can do complex search and replaces, but regular ol’ find-foo-replace-with-bar will still work.

Teaching regular expressions is waaaay beyond the scope of this little blog, there are a ton of resources out there written by people who actually study this kind of thing. A starter is the mozilla documentation.

How to use it

Targets section: sets what will be searched and replaced. Note that some property names, like effect controls, can be changed while others can’t. The script will fail silently if the property name cannot be changed.
If you change layer names the references to them in expressions are automatically updated.

Search Patterns: The regular expressions, or plain text that you want to search for, and then replace with, e.g. foo and bar or f([o]*) and b$1r

Case-Insensitive: Search without considering case. E.g. foo will match Foo and FOO

Regex flags (for regex searches):

Global: Don’t give up after finding the first match. e.g. in the text foobarfoo the search pattern foo will match twice with global on, and once without.

Multi Line: Search patterns can include line breaks.

‘.’ matches newline: The period character <strong>.</strong> normally matches any character except for newlines (line breaks). Turn this on and it will match them too.

Layer and Property filters: Choose whether to only search in selected layers or properties, and whether to apply changes to locked layers too.

Installing After Effects Scripts

Recent versions of After Effects will take care of the installation for you.

For scripts with a UI, go to the File menu in AE and choose Scripts>Install Script UI Panel. Point it at the unzipped .jsx file that you just downloaded and let it work its magic, then restart AE.

For Scripts with no UI use File>Scripts>Install Script File…

Running the script

UI Scripts appear appear in AE’s Window> menu. Calling the script from this menu will make its window appear, and it can then be docked like any other panel. If you want it to always be visible, add it to your workspace.

Non-UI scripts appear in the File>Scripts menu, you can assign them to a keyboard shortcut, or you can use a plugin like KBar.

Download

You can download just this script here

or you can get all of my scripts here.

4 comments

  1. […] The worst has happened. A client has requested a name change, and now every comp is filled with the incorrect word. This plugin can make life a lot easier. Its benefit is so obvious that I wish Adobe had it built into the entire CC suite. This also comes in handy when re-skinning old projects for new clients. Just be sure to check over every instance of your word replacement. Issues like anchor points and scale may need to be fixed. You can also find a fancier version of this here. […]

    Reply

  2. […] The worst has happened. A client has requested a name change, and now every comp is filled with the incorrect word. This plugin can make life a lot easier. Its benefit is so obvious that I wish Adobe had it built into the entire CC suite. This also comes in handy when re-skinning old projects for new clients. Just be sure to check over every instance of your word replacement. Issues like anchor points and scale may need to be fixed. You can also find a fancier version of this here. […]

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.