After Effects ExtendScript Training: Ep. 17 Part 2

July 28th 2012 08:30:02am

  • 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.

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.

Checkout more:
Free Function Friday Ep.5 – itemLongestSide
Houdini Mardini Mud
Ikea Lack Photogrammetry Turntable Part 2
Free Function Friday Ep.14 – importAFile
Free Function Friday Ep.19 – getThirdPartyFX