Stop-‘n-Go – an emergency stop button for expressions

I was doing some rigging recently, when something went wrong and the whole rig exploded on me. ‘By cricketty’ I thunk to meself, ‘there should be a stop button for expressions like there is for my bandsaw’. Those things could take someone’s leg orf.

So I got out my scripting iron, and clickety-clackety wrote this little script.

It has two modes:

  • using the Pause / Resume button pauses and resumes expressions, either on all layers or just selected ones. In this mode it won’t start any expressions that have been disabled manually (by clicking the = button), just ones that it has paused
  • Using the Start diabled Xps button will start all inactive expressions, including those that have been paused by the script, and those that have been turned off manually.
  • The Freeze buttons convert the expressions into keyframes, either at the current frame, or at any existing keyframes in the property.
  • the Xps > Keyframes button is the same as the native convert expression to keyframes. It makes a keyframe for every frame, except that it can work across layers and properties, to freeze them all. On long comps with lots of expressions this can be glacially slow. Soz.
  • The filters at the bottom decide whether the functions work on all layers, on selected layers only, or on selected properties only. You can also have the expression work on locked layers.

The script adds a comment to the end of any expression that it has paused. The default comment is "//paused" if you want to change this for whatever reason, then look for this line in the script:

var pausedTag = "//paused";

…and change the value to anything you like, as long as it starts with two forward slashes.

Download

You can download this script along with all my other scripts here. Or to download just this script click the download button below.

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.

Running the script

Once the script is installed it should 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.

Leave a Reply

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