Free Function Friday Complete Series
Free Function Friday Complete Series

July 13th 2016 08:00:10am

Welcome to the epic collection of Free Function Friday. A series specifically about After Effects ExtendScript coding and how it could be levied to speed up repetitive tasks, inform us on aspects of our project, and allow us to create helpful automation. Free Function Friday was a spinoff series from the very popular After Effects ExtendScript Training series created back in 2013. It had packed many hours of training into nineteen episodes. Some of which were multipart episodes.

Free Function Friday continued the free educational training of ExtendScript with newer information, better techniques, and more reusable code. It was meant as a further jumping point for non and seasoned programmers alike. Most of the code talked about could be combined to build your own scripts easily, others as tools to help script development, or to address a specific area of After Effects. As mentioned above, this new series had forty episodes and comes in at eleven hours and forty minutes of training content. All for free.

My hope for this series as with the last few, is that you find it useful in some way. Whether you are a beginner wanting to get started in scripting After Effects, an intermediate ExtendScript coder that is wanting some more tools to add to their collection, or an advanced programmer just looking for a bit of understanding of how the ExtendScript language operates. There’s usually something for everyone.

Below is a list of each episode and a brief description. You may want to right click on the links and open in them in a new tab/window just so the full list is still easily accessible for you. Happy learning!

EP1: Introduction, overview of series, and resources to help out.
EP2: getLayerEffects Retrieves all of the plugin effects on a layer.
EP3: runMenuCmd Will trigger a menu command as if the cursor clicked it.
EP4: aeToOSFolder Will recreate your AE folder structure in the OS folder of your choice.
EP5: itemLongestSide Returns which side of a layer or comp is longest.
EP6: collectAllPrecomps Returns an Array collection of any compositions that have been precomposed.
EP7: getSelLayBlendMode Tells you the blending mode setting of a layer in a more readable way.
EP8: moveToFolder Will move a project item(s) into a specific project folder.
EP9: retrievePrimaryComps Returns an Array collection of CompItem objects that have NOT been precomposed.
EP10: resizeComp Will resize your composition from the center outwards.
EP11: collectFontsUsed returns an Array collection of the fonts used in your project.
EP12: findCompByName Will find and return any CompItem object that matches a name you supply it.
EP13: aeVer Returns the version of After Effects in a more manageable way.
EP14: importAFile Imports a folder of files or a specific file format of your choice.
EP15: getAllTextLayers Returns an Array collection of TextLayer objects.
EP16: itemFolderHierarchy Returns the project folder heirarchy path to a project item.
EP17: layerPropMatchNames Returns and Array collection of property matchNames for a Layer Object.
EP18: getAELanguage Returns the After Effects language name in a more sensible form.
EP19: getThirdPartyFX Returns an Object Array containing data on third party plugins installed in After Effects.
EP20: showHideControls Makes showing and hiding multiple ScriptUI control and container elements easier.
EP21: collectCompCameras Returns an Array collection of CameraLayer objects.
EP22: getLightType Returns the light type of a LightLayer.
EP23: getCurComp Returns the currently open CompItem object.
EP24: changeFolderPaths Changes renderqueue item “Output To” folder path, with options to choose Queued, Unqueued, or both.
EP25: collectAllSolids Returns an Array collection of SolidSource FootageItem objects.
EP26: applyPluginEffect Applies a plugin to multiple layers at once.
EP27: currentTime Returns the current time, with options for customizing the separator, and choosing from military or standard formatting.
EP28: layersAtCurTime Returns an Array collection of layer objects that are actively present at the composition’s current time indicator.
EP29: isLayerRetimed Checks a composition layer to see if it is retimed, and returns an object Array of boolean values for each type of layer retiming.
EP30: addCompMarker Will apply a comp marker to the current composition at the current time indicator location.
EP31: removeUnusedEffects Will search the entire project and remove plugin effects that are not being used.
EP32: getKeysBasic Returns and Array collection of keyframe data for a property.
EP33: locateMidPoint Will return a vector array value for the mid point between two or more selected layers.
EP34: removeUnusedSolids Will search through the project items and remove any SolidSource item that is not being used.
EP35: removeKeyframes Removes keyframes from a property you supply it.
EP36: fpsCheck Returns an Array collection of item names that do not match a specified frames per second (fps) value you supply it.
EP37: getLabelColorNames Returns an Array collection of project/layer Label Color names.
EP38: getMaskPaths Returns mask shape path data for an AVLayer object.
EP39: setMaskPaths Applies mask shape path data to an AVLayer.
EP40: getLayFXMatchNames Returns plugin effect matchNames easily for use in scripts.
EP41: fillCompWithShape Translates a chosen mask shape path into a ShapeLayer and copies it by a chosen amount randomly within the composition 2D space.

All of the code I provide in this series, has been created and tested in After Effects CC 2014. Unless otherwise specified in the episode, the code should be compatible with After Effects CS6 through CC 2015. I’ve done my best to avoid depreciated code (code that Adobe removed at some point), and made these functions as compatible as possible. There will however be the occasional piece of code that is brand new as of a certain version of After Effects and therefore will not be backwards compatible from that version. I will mention these if that is the case.

With that said, all the code I provide in this series is open source and free to use in your scripts. I highly encourage you to expand and improve upon the code I provide and start making your own custom functions as well, but please do not repost the code I show in this series as is and claim it as your own. If you use any of the code provided in this series please give credit where credit is due.

This series is meant to provide, what I feel is useful code, as well as to hopefully further explain ExtendScript and it’s quirks. While the functions we build throughout this series can perform a task all on their own, they are not meant to be a solo script. How you combine them together and expand upon them is when you will gain the most from these functions.

Checkout more:
High Pass After Effects Script
Free Function Friday Ep.2 – getLayerEffects
Free Function Friday Ep.26 – applyPluginEffect
8 Bit After Effects Template
Expression Shorts Attach 2D Layer To 3D Layer