Ask Your Expressions and Scripting Questions Here.
It has been requested in various threads now, that I make an expressions sticky thread. So here it is.
I might add a few scripting bits and pieces in here too. Scripting is also a very powerful way of extending After Effects capabilities. More powerful than expressions, in fact, because scripting can automate most of what the user can do in Ae. But because scripting is a much more complicated beast, most of this thread will be dedicated to expressions.
Above all, the point of this thread is to collect the answers to those frequently asked questions on the forums. Some buyers might find it useful, but it’s basically aimed at Videohive authors.
Like the Essential Resources thread, I’ll collect the best stuff in this post. I’ll edit and format the best responses and then link to them from this post as a kind of expressions knowledge-base. Please make sure to format any code you post inside “pre” tags.
- What are expressions?
- After Effects Expression Language Reference (external link)
- How to set min and max values for an Expression Slider Control
- How to globally set depth of field
- How to use an Expression Layer Control
- How to use a master Checkbox Control to turn layers on and off (using the value keyword)
- Dealing with different data types in expressions.
- value and valueAtTime()
- How to parent a camera to a null using only expressions
- How to wiggle a layer at a certain angle
- Expression for a smooth credit roll
- Auto fade expression
- Auto fade expression (more robust)
- How to make a squish and squash expression with layer markers
- Is it possible to change only a specific keyframe in an animation?
- Simple 3D Depth Cueing
- How to Build a Simple Bar Chart From a Text Layer (video)
- How to give layers a random rotation
- How to link a property to a control layer based on its own layer name (regex)
- Going mad with regex
- Controlling CC Page Turn With Expressions
- Getting 2D Screen Coordinates of a 3D Object
- Boolean Logical Operators in Expression Language
- Simple Time Offset
- Robustly Linking Positions Across Comps With Layer Space Transforms
- Freezing Animation At A Layer Marker
- Setting Camera To The Default Camera's Position
- What is scripting?
- CS6 Scripting guide - Note: Scripting, NOT expressions (external link)
- How to turn motion blur on for all layers
- Offsetting Y Position Of All Layers By 50 Pixels
- Writing A Binary Image File To Disk
- Writing A Binary Image File To Disk Pt. 2
- How To Detect All Text Layers In A Project