top of page
Search

Free After Effects Script - convert Overlay Values Expression to Template Literals

  • Writer: Roland Kahlenberg
    Roland Kahlenberg
  • Aug 21
  • 1 min read

Updated: Aug 22


Here's a Quick Tip on creating Value Overlays - these are numeric timeline properties that you can drag into the Composition Panel to display their dynamic values.



Value Overlays or Overlay Values are Text Layers that display a property's dynamic value in the Composition Panel.



ree


To create such a Text Layer, you drag the numeric property from the Timeline into the Composition Panel. The Text Layer is created as a Guide Layer and its Text Styling inherits the current settings of the Character Panel.



Value Overlays are great but the Expression that is part of this feature uses old-school Javascript String Interpolation which is difficult to read and edit.



So, I wrote an After Effects script (took two prompts in Grok4 Expert Mode) to convert the standard Expression (uses String Concatenation) to use Template Literals (String Interpolation).





This is what the Expression looks like with this feature - "Position: " + thisComp.layer("Burger VVG05").transform.position[0] + ", " + thisComp.layer("Burger VVG05").transform.position[1]



And this is what it looks like as a Template Literal -

`Position: ${thisComp.layer("Burger VVG05").transform.position[0]}, ${thisComp.layer("Burger VVG05").transform.position[1]}`




SCRIPT INSTRUCTIONS - 1 - Download the ZIP Package 2 - Unzip to receive a JSXBIN file - a script file 3 - Launch the script from the File Menu or drop the script file into the Scripts Panel folder and launch it from the Windows Menu.

4 - Create an Overlay Value Layer. Select it and click on the Create Template Literal button in the Script UI.

5 - This script supports batch processing



Read more on Template Literals -


 
 
 

Comments


bottom of page