After Effects ExtendScript Training: Ep. 17 Part 1, 2, and 3

ExtendScript Script Writing Training

Welcome to episode 17 of the After Effects ExtendScript Training series. This week we get to make our third full length script. Spread over three parts, this episode is focused on exporting property information to a text document file. What does this mean exactly? Well we will be creating custom functions that will allow us to select a number of layers and/or layer property groups in our composition, recursively dive down deeper into each successive property group and retrieve information about each property along the way. Essentially we will be able to grab the property index, name, and matchName for nearly all of the properties of a layer. This is very handy information to have when building scripts and if you are looking for property specific data. While we will only be grabbing three key bits of information, there are a number of attributes that can be added or replaced to get the info you are looking for on properties. The data we get will be exported to a text file in a nicely ordered list that is indented for each sub level property. Effectively building a chart for you to reference easily. As a bonus the functions we build will also be independent enough to run outside of this script in your own script creations. We build a writeDoc() function that will simply create a text document and save it to a folder of your choosing, and we will build an osCheck() function that easily retrieves whether a PC or MAC is being used, plus much more. This is a fairly long script, so let’s get started.

If you missed any of the previous episodes in this series, follow the links below.

Previous episodes in the series:

Episode 1 (Intro)

Episode 2 (Javascript Basics p1)

Episode 3 (Javascript Basics p2)

Episode 4 (After Effects Object Model structure overview / Script Preparation and development tips / Single Item Access of various project items, comps and layers)

Episode 5 (Access Renderqueue items, output modules and file paths / Multiple item access of project items, comps and layers / Batch change all renderqueue items file paths)

Episode 6 (Collecting data into an Array() / Changing values / Various tips)

Episode 7 (Create new comps and folders / Create Null, Solid, and Text layers)

Episode 8 (Create multiple comps of various sizes / Use Undo group / Add solids to match each comp / Various tips)

Episode 9 (Globally change blue solids to red / Replace solid name blue with red)

Episode 10 (Build a custom function to collect all CompItem objects / Modify function to dynamically allow for choice of CompItem, FolderItem or FootageItem)

Episode 11 (Build floating GUI)

Episode 12 Part 1 & 2 (Build dockable/floating combo GUI)

Episode 13 (ExtendScript Developer Utility script / Retrieve list of project item footage file paths)

Episode 14 (Processing text strings)

Episode 15 Part 1 & 2 (Reading, writing, and transferring Keyframes)

Episode 16 Part 1 & 2 (Creating text layers from external text files.)

In this episode:
– Retrieving property and layer selections.
– Create function to recurse property groups.
– Create function to check for type of OS running.
– Create function to create and write to a text file.

 

 


David Torno

David Torno is a Visual Effects professional based in Los Angeles, California. His work over the years has included commercials, feature films, music videos, and multimedia projects. During his free time, David enjoys expanding his knowledge in Visual Effects by learning new softwares and techniques that are being used. Along the way he also contributes to the visual effects community by offering helpful tools, and tutorials that creative professionals around the world can benefit from.

Leave a Reply

3 Comments on "After Effects ExtendScript Training: Ep. 17 Part 1, 2, and 3"

Notify of
avatar
Sort by:   newest | oldest | most voted
David Delayat
David Delayat

Dear David,

I used your script and it worked very well. I added the ability to write the expression if existing, but I’m having a problem : I’m using a plugin creating properties to my text layer, and the script doesn’t read them. Do you have any clue on how to get them ? the plugin is animation composer.
Thanks a lot

David Torno
David Torno

If you are trying to access the Character Animator properties of a TextLayer, this might help: https://www.provideocoalition.com/after-effects-extendscript-training-ep-17/ It shows how to create a document listing all of the property names and matchNames. It could help show you the access path to those properties.

David Delayat
David Delayat

Yes that’s what I did ! But the AC’s properties doesn’t shows up. Any clue ?

wpDiscuz