Ep. 12 aeVer Free Function Friday
Welcome to Free Function Friday episode 12 aeVer. Today we take getting the version number of After Effects to the next level. Why? Because getting the version number cleanly is not as simple as you might expect with ExtendScript. Simply calling app.version
will give you the full version number of the After Effects application you are currently running. This will usually be a group of three numbers joined by a “.” and an “x”, like this “13.2×49”. Now if you were trying to compare that value, to say, make sure a user was running After Effects CS6 or newer then you would need to do parsing to that “13.2×49” string just to get the 13 part so you could compare it to see if it was higher or lower than 11. Why 11? That would be CS6’s actual software version number. Confusing, I know. It would be a lot easier if you could just say something like app.version.major
and just get “13”, and that is what we are doing today. The aeVer function will allow us to get the following values.
example: 13.2×49
aeVer.major
(returns 13)
aeVer.minor
(returns 2)
aeVer.subMinor
(returns null since it does not exist)
aeVer.build
(returns 49)
aeVer.full
(returns 13.2)
Much easier than parsing and assembling to get those values every time. Granted of course we will have to do those tasks for this function, but that is the great part about functions, they are valuable code that can be reused if built right. Just copy and paste it into your current script and you immediately have access to it without all the typing. For our use we mostly only use three of the four number sets, and that is because it does not seem that After Effects has utilized the sub minor number yet, but it may show up in the future so we should be prepared for it. Adobe just released After Effects 13.6.1 yesterday. 🙂
As a side note, After Effects version numbers come in two forms. One is the actual software version number, and the other is the public name for the software like CS4 and CC 2015. Here is a list of the public names and numbers that each primary version started on.
After Effects 6.5 (is actually 6.5)
After Effects 7 (is actually 7.0)
After Effects CS3 (is actually 8.0)
After Effects CS4 (is actually 9.0)
After Effects CS5 (is actually 10.0)
After Effects CS5.5 (is actually 10.5)
After Effects CS6 (is actually 11.0)
After Effects CC (is actually 12.0)
After Effects CC 2014 (is actually 13.0)
After Effects CC 2015 (is actually 13.5)
After Effects CC 2015.1 (is actually 13.6)
As far as software versioning in general goes, the standard involves a Major, Minor, SubMinor(aka: Maintainence, or Patch), and a Build number. These numbers refer to various stages in the development process, and are used to keep track of every change made to a software. To understand more about software versioning formats you can read more on Wikipedia here.
If you haven’t done so already there is a Free Function Friday introduction video located here that has some important information pointing to a few resources that will come in handy when scripting for After Effects.
Episode 12 aeVer:
Legal note: The Adobe ExtendScript code talked about in this article and accompanying embedded video(s), and/or graphic images are not guaranteed to be compatible with every version of After Effects. David Torno, ProVideo Coalition, and Diversified will not be held liable for any misuse or incorrect use of the provided ExtendScript code. Use at your own risk.
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.
Filmtools
Filmmakers go-to destination for pre-production, production & post production equipment!
Shop Now