save hours on layer naming

Time is money

In the animation and visual effects industry, time is a precious commodity. When working on projects with hundreds or even thousands of layers, manually renaming each layer becomes a grueling task that can take hours. It's not just tiring, it takes you out of your creative flow and negatively impacts the quality of your work. Time that could have been spent creating the animation is now spent getting the project to a state where it's “somehow workable.”

I have been working in Adobe After Effects (AE) for several years now, mostly with shape graphics. Often, when you start working on a project after you have been given a file by an illustrator, you come across the fact that if the illustrator does not know the minimum principles by which the animator works, or was not warned about this, then the project may end up in a terrible state for the animator. In the end, they give it to you with 100+ layers, the names of which vary from “vector, vector, group, group” to “layer0101, layer0201, layer0202”. The import is complete, you quickly evaluate the viewport – it is excellent, but the timeline is chaos with signs of physical violence in bluish-gray shades. Of course, I am exaggerating, but this is exactly how it feels.

This is what my typical timeline looks like after importing a project from Figma. As you can see, even layers that aren't vector by nature are still named “Vector”, and the project ends up with 200+ layers with that damn name mixed in with some other layers named “group”.

The problem and its solutions

Over time, I started to feel burnt out by such projects even at the stage of discussion with the customer. I already understood that, most likely, I would encounter a “mess” of identical or meaningless layer names.

Solution options:

  1. Ask the client to return the project to the illustrator for revision taking into account the animator's requirements. However, this option rarely works and is not liked by either the customer or the illustrator. The customer may not want to contact the illustrator again, especially if the collaboration has already ended, or the artist may be unavailable.

  2. Use plugins inside AE. I tried several different plugins to solve this problem, but none of them worked. Some had insufficient functionality, others had too complicated a process of using. The last plugin that helped me at least a little was “AE Global Renamer 2”. But its name speaks for itself: it renames only those layers that already have adequate names or at least similar ones. But how to rename if all layers have the same name? In addition, this plugin has a confusing interface and requires entering complex expressions – this is my personal opinion.

Using a plugin was probably the best option, but there was no suitable tool for me. I needed simplicity and, as much as possible, immediate intuitiveness of working with the tool, so that understanding and remembering its functionality would not become another problem.

The idea and its implementation

All of the above was the main reason for the idea to create my own solution. I got additional inspiration from the mini-script “FXrenamer”, created by another AE user also using GPT. His script performed a single function – it assigned a list of effects applied to a layer as a name. Having finished another project with a similar problem, I firmly decided to deal with it and started developing my own tool.

I started brainstorming. The key desires were:

Reviewing projects with a chaos of identical names, I noticed the following: each layer in AE on the timeline has common and unique properties, such as position, size, rotation, opacity, and others. And then it dawned on me: you can create a library of “smart” variables from these properties and their values, where each variable will receive an individual value for each layer. Then from these variables you can compose an expression based on the need for a name for the layers or their immediate function.

Implementation

How did the development itself begin? It all started with purchasing a subscription to GPT-4because I'm far from a professional programmer, and not even an intermediate one, although I am familiar with the basics of JavaScript and the principles of how programming languages ​​work. Having access to this “AI” magic, I began to compose the prompt from which it all began. My initial goal was simple: to create a rudimentary graphical interface with one input field and a button, to check whether it is possible to create something really working with GPT. The original prompt, unfortunately, has not survived, but it looked something like this:

Я: “I need a script for Adobe After Effects with a graphical interface containing an input field and a button that renames layers in the timeline to the value in this field.”

GPT: “Of course! Here's the code for JavaScript. Create a file, put it in the specified directory, open it in AE – and everything should work. Let me know if you have any problems.”

I followed the instructions and the script ran on the first try, doing exactly what I asked for: a simple panel with an input field and a button to rename layers. Realizing the potential of this “AI” magic, I decided to expand the functionality and logic of the script.

Я: “Ok, that works. Now we need to add the ability to select layers (all or only selected ones).”

GPT: “Of course! Here is the updated code on JavaScript. I added two radio buttons Total And Selected to select layers.”

After a few evenings of playing with GPT, I had the first full version of my tool. It implemented the function of converting input variables into values ​​obtained from layers, as well as several other features for more precise control. Here's what it looked like:

Transition to a new development environment

Having encountered a critical error that prevented the script from running, I realized that I needed a more powerful development and debugging tool. The code was growing, and the Sublime Text editor was no longer suitable, as it did not allow for full debugging of the code for AE. In addition, I needed version control, which meant learning Git.

Once again, GPT-4 came to the rescue. In one evening, I installed Visual Studio Code, created a GitHub account, set up a repository for the plugin, and installed the necessary plugins to debug the code in AE. GPT-4 walked me through it step by step, and the whole process went smoothly.

Second version of the plugin

In the second version, I fixed a critical bug, improved the interface, and added new variables. Communication with GPT-4 during development looked something like this:

Я: “Now I'll write you the code for the script in Adobe After Effects, look at it carefully and I'll tell you what to do with it next.”

GPT: “Okay, send me the code, I'll look at it and we'll work on it according to your instructions.”

Я: [Код]

GPT: “Your code looks complex and does such and such, what do you want to do with it?”

Я: “I need such and such functionality and it should perform such and such actions under such and such conditions, write the part of the code that you changed”

GPT: “Here are the updated parts [Кода] for your plugin, please test it”

Я: “I tested it, the described functionality does not work quite correctly, let's clarify the details of how this functionality works. (I clarify the functionality (I describe in more detail what is needed)”

GPT: “I understand, let's rework it to more closely match your refined requirements. Here's the updated one [Код]

Я: “Okay, now it works. Let's continue to refine it.”

This is how our interactions went. If GPT-4 started to deviate from the topic or rely on outdated information, I would simply start a new chat to focus on the current tasks. By the way, this is what the second version of the plugin looked like

Delighted with the results

I was extremely pleased with the tool I created. It completely solved the problems that had been irritating me for so long. Now I don't care whether Illustrator renamed layers or not – two actions in my plugin completely eliminate this problem.

Planning a new version

For almost a week I used this version and noted for myself what could be improved for even more comfortable work. In a few days a plan for the next version was formed, which included:

  • System for saving and updating templates and settings

  • Extended set of variables

  • Additional logic modes for some variables

  • Copy function of the selected layer name

  • View all values ​​for all variables

  • Using hotkeys to interact with a script

  • Setting interpreted values ​​in certain cases for some variables

  • Two interface modes: minimal and standard

As soon as I had some free time, I started implementing these ideas. The method of interaction with GPT remained the same as for the previous version: I sent him all the code, described the necessary changes in detail, received the updated code, tested it and made adjustments if necessary. Some tasks were easy, others required more effort, but thanks to persistence and detailed instructions, everything was implemented.

By the end of development, the script's core code was over 2,000 lines. GPT handled that volume without any problems, finding the necessary fragments based on my descriptions. The entire project grew to over 3,600 lines of code. It all took a little less than a month of free evenings and $40 for a two-month subscription to GPT Plus. Here's what the latest and current version of my plugin looks like, which I've been using for over a month now and am very happy with.

Results

What I got from creating this project:

  • A unique tool to save time and improve the convenience of work in Adobe After Effects

  • Valuable experience in developing a solution using the Chat GPT-4 neural network

  • Experience working with GitHub and testing via Visual Studio Code

  • Confidence that any problem can be solved, even without deep programming skills, but with desire and purpose

  • Positive emotions from the work done and the results achieved

Will this project be continued in development? More likely than not. I am completely satisfied with the current version, but I continue to collect feedback and notice possible improvements. As soon as I have enough ideas for the next iteration, I will definitely start creating it.

Where can I download it and how much does it cost?

From the very beginning, I decided that my tool would be absolutely free for everyone. The project has an MIT license. The script source code is completely open, and releases are available in the repository on GitHub and in my Telegram channel. I also created online documentation on Notion with support for Russian and English.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *