June 23rd 2012 09:00:14am
In this episode:
Welcome to episode 12 part2 of the After Effects ExtendScript Training series. Last week we focused on building a floating panel with GUI elements, so this week we are gonna rebuild the same thing, but with a twist. We will use the same elements, but we are going to use different code which will allow us to make this panel either dockable or a floating panel in After Effects. We’ll also be using a resource string to build the elements.
A resource string is a very common way to code a GUI and in our case allows for the elements to be a bit more cross compatible with PC and Mac by way of an auto layout system. We can choose which direction a group of buttons should flow, or have elements resize with the main panel, restrict some element sizes while allowing others to auto fill, etc… A resource string involves a lot more typing, but it’s absolutely worth it.
By having a panel dockable, it will also take on the color scheme and appearance of the main After Effects interface by default. This adds a nice native look to your script GUI and allows for a more professional feel to your script.
AFTER EFFECTS CC NOTE: This series was recorded before After Effects CC was released. In After Effects CC, Adobe updated the ScriptUI for ExtendScript, so some of the information in this tutorial may not work in After Effects CC. This tutorial was made using After Effects CS6 and the code explained should be compatible with CS3, CS4, CS5, CS5.5 and CS6. Odds are that it is still compatible unless Adobe decides to depreciate any object or remove the ExtendScript language all-together at some point.