After Effects Scripting – Sandwich Bar

9th March 17

Back to Blog


We all use high profile scripts and plugins and appreciate the huge effect that these have on our experience as animators. As a community we’ve become obsessed with finding the holy grail of a perfect workspace. For me, the ultimate aim of these scripts is flow. The less barrier between a thought (eg. this comp needs to loop) and an action, the better able we are to focus on being creative and producing better work.

Studios such as Buck show us how building your own tools can improve the workflow for everyone in the studio. This approach is proof that you don’t have to wait for other people to solve the problems you encounter daily.

Deciding not to just live with the tools After Effects provides has seen us asking a lot of questions about how we animate as a studio. Could something be done quicker, better or more consistently? If it could, then lets try and create a solution.

As a developer, who understands the basics of extendscript, I have the POWER (scripting knowledge) to try and improve our efficiency and work flow in programs like After Effects by building our very own tools. My first toolbar (aptly named The Sandwich Bar) is a simple panel working as a test bed for new scripts for all of us at HSC to try out. This is constantly evolving and loads of features have already been axed through lack of use.

Right then… Let’s talk about what scripts still remain on The Sandwich Bar:

So here she is… Don’t judge her to harshly she’s just a WIP!

1. Setup Inspired by the case studies on GYST,this script helps us set up a new project, making a consistent folder structure in after effects and also in your finder. The AE work file will also move itself into the AE folder.

2 & 3. Save Work Area We’re often working within small time frames, getting a few keyframes just right before moving on to the next part. This script remembers the start and the end of our work area and lets us pop back to it at any time. This is helpful when it comes the time to render as it remembers the full comp length.

4. Time Remapper This script simplifies looping clips by adding a time remap that ends where your playhead is. If done manually, you would have to add a time remap, place a new keyframe at the end of your loop, delete the last keyframe then add a loop expression. This makes it waaaaay easier.

5. Half way finder Does just what it says on the tin. Highlight 2 or more keyframes and it’ll put your playhead exactly half way between them. This is ace for creating perfect loops.

5. Source This is the latest addition to the set. This button finds the source of the selected layer and opens it. This is a huge timesaver for working with AI and PSD files in After Effects. The artwork opens up in Illustrator without having to deal with the project panel or finder.

Being able to identify something that could be done quicker and easier and having the ability to do something about it is really exciting – leading us to develop bigger tools as a studio and hopefully something we can share with the community really soon 😉

As an intro to the world of AE scripting, I couldn’t recommend David Torno’s video series enough. Redefinery’s scripting fundamentals is a fantastic guide I go back to again and again. For real world examples of little solutions to problems, definitely check out Zack Lovatt’s scripts!

Posted by Martin