Overview
By leveraging a little-known workflow, the Creative Expression Library makes complex expressions accessible to both novice and advanced users via a plug-and-play interface, and results in improved performance in both After Effects projects and Motion Graphics Templates (.mogrt).
Getting Started
Ensure your Expressions Engine is set to JavaScript. Go to File > Project Settings > Expressions.
Auto-Complete Library
To streamline use of the Creative Expression Library, we've included a helpful script to add custom functions to the native Expression Editor Auto-Complete. To set-up the auto-complete feature, open After Effects and go to File > Scripts > Run Script File...
- Select the script “addCustomFunctionsToExpressionAutoComplete.jsx.”
- Hit the “Select Expression Library.jsx File” button
- Select “CreativeExpressionLibrary-v2.1.jsx”
- Hit the “Add Function to Auto Complete” button.
- Restart After Effects.
The Creative Expression Library functions will be added to the Expression Editor Auto-Complete library in After Effects. This script can also be used to add your own custom expression functions.
Writing Expressions
Import the CreativeExpressionLibrary-v2.1.jsx file to your project. Select a layer and alt-click on a layer property to open the Expression Editor.
To use the Creative Expression Library in an expression, first create a reference to the file imported earlier. Pickwhip to the CreativeExpressionLibrary-v2.1.jsx file in the Project Window and add .sourceData; to the end.
Hit enter to start a new line, type in createLib. and you may now add any of the included functions to that layer property.
footage("CreativeExpressionLibrary-v2.1.jsx").sourceData; createLib.
Resources
To access the Info and Help for an individual function you can use the getInfo() function or "help" argument. In the Expression Editor, type getInfo("nameOfFunction") to return a detailed description of that function and how to use it. Alternatively, type "help" as the argument for any function to return a detailed description of that function and how to use it.
footage("CreativeExpressionLibrary-v2.1.jsx").sourceData; createLib.getInfo("flipHorizontal")
or
footage("CreativeExpressionLibrary-v2.1.jsx").sourceData; createLib.flipHorizontal("help")
By default the function's "help" tool-tip will appear in the Expression Editor. Click the yellow error icon /!\ to open the tool-tip as a dialog box.
Saving Expressions
- With "New Project Template", you can have access to the Creative Expression Library in every new project.
- Expressions can be saved as custom Presets. They are easily found and accessed via the search field in the Effects & Presets window.
- Expressions can be saved as buttons with third-party extensions like KBar.
Glossary
A Glossary of all functions in the Creative Expression Library, with arguments and example expressions, is available at the link below.
Rendering to Adobe Media Encoder
Footage items are not included in the collected AME project file when rendering to AME. To ensure all functions referred to in the Expression Editor will evaluate correctly, include the Creative Expression Library file as a layer in each Composition it is used in, even if that layer source is hidden.