In After Effects, when you enable Time Remapping for a layer, it automatically sets two keyframes: one at the media start and one at the media end, irrespective of how you may have trimmed the layer.

If you’d prefer your key frames to be spaced at the in point and out point of the layer — in other words, if you’d like time remapping to work on your trimmed time range instead of the entire media’s time range — you can use keen-TrimRemap.

Here’s a screenshot showing the difference between using Ae’s “Enable Time Remapping” command and running keen-TrimRemap:


You can use this script like any other; just download it, unzip it, and place it in the After Effects script folder [link].

However, if you’d like, you can also replace Ae’s normal time-remapping behavior with this script. To do this we’ll take advantage of the fact that you can assign keyboard shortcuts to the first 20 scripts in your script folder.

Rename the keen-TrimRemap.jsxbin file I’ve provided as 01-keen-TrimRemap.jsxbin in your After Effects script folder. This will force it to the top of the list, so we will know it’s the first script in the menu.

Next, in After Effects, open “Preferences > General.” Down at the bottom of the dialog box, you’ll see a button that says “Reveal Preferences in Explorer” on a PC or “Reveal Preferences in Finder” on a Mac. Click that.

Locate the shortcuts file (mine is named Adobe After Effects 13.2 Win en_US Shortcuts.txt) and open it in a text editor. Search for the text EnableTimeRemap — you’ll find a line like the following (it will be slightly different on a Mac):

"EnableTimeRemap" = "(Ctrl+Alt+T)"

Select everything in between the parentheses and cut it out. Look a couple lines down, at this line:

"ExecuteScriptMenuItem01" = "()"

Paste the shortcut in between the parentheses.

Basically, we are changing these two original lines:
"EnableTimeRemap" = "(Ctrl+Alt+T)"
"ExecuteScriptMenuItem01" = "()"

To these:
"EnableTimeRemap" = "()"
"ExecuteScriptMenuItem01" = "(Ctrl+Alt+T)"

Now, when you use the keyboard shortcut for time remapping, Ae will run the script instead of using the built-in command. Of course, you can restore the defaults at any time by changing the shortcut back, or by resetting your preferences and shortcuts. You can also still invoke Ae’s command from the menu system.

Feedback on these scripts is always welcome.

Download keen-TrimRemap [link]

Posted by Walter Soyka

Leave a Reply