Skip to main content
PFuerst
Inspiring
August 25, 2022
Frage

Create number of Project folders with Automation Blocks

  • August 25, 2022
  • 3 Antworten
  • 2095 Ansichten

Hey,

I had a new idea for a simple Automations Blocks script. As I find myself sometimes in need to create a set of folders for my Compositions in the project bin I thought I might create a script to do so. However I have a couple of problems.

At the start I want the script to ask for the number of folders it will create and how to Name those(a number should also be added to the end of the naming) as well as if it should also put in a "Pre-Comps" folders(as I always find myself creating one in there as well). If I have a folder selected in the project it should paste it there otherwise I guess it would be nice to just put it in the root.

I started the script and I'm able to add one folder and the Pre-Comnps folder to the Project, however it will not take into acount the number I have added in the dialog(maybe it does but created all of the folders in top of each other as it doesn't know if it should increment the name. But I have no idea at the moment how to tackle this. I have attached my script so far.

Maybe someone can take a look and add nice features that I might not have thought of yet.

Best

Dieses Thema wurde für Antworten geschlossen.

3 Antworten

Mathias Moehl
Community Expert
Community Expert
September 18, 2022

Here is your tool 🙂

The most tricky part was picking the right parent bin. I decided to create a separate function, which checks if only exactly one project bin is currently selected. If so, it returns this bin, otherwise the root bin.

To create the numbered bin names, I just used a block which combines several strings into one (namely the string for the name that the user entered plus a space symbol plus the number. Note that you can delete the space or replace if by a "-", for example, if you want instead of "name 1" something like "name1" or "name-1".

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
PFuerst
PFuerstAutor
Inspiring
September 20, 2022

Thanks again Mathias for taking the time to take a look at my script.

 

This is just so nice and works as I've expected it to work. I didn't even know that a helper function would be possible. Also how to setup default values in a user interface is good to know.

 

Mathias Moehl
Community Expert
Community Expert
September 21, 2022

Yes, default values are very easy. Just set the variable to the values before creating the dialog. 🙂

 

I should probably record a tutorial about creating helper functions, since they can make bigger tools much more modular. If you click on the cog wheel icon at the top left of the helper function, you can even add function arguments.

To learn more about functions in Automation Blocks see here:

https://mamoworld.com/docs/automation-blocks/block-reference/functions/

 

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Mathias Moehl
Community Expert
Community Expert
September 18, 2022

Hi Pascal,

sorry for the late reply! Essentially you need to use a count loop and then create the folder inside the loop. I will look at your code now for a more detailed answer.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
PFuerst
PFuerstAutor
Inspiring
September 9, 2022

I guess I could also just create one set of folders with a pre-comps folder in it and duplicate it a couple of times as I need it. But it would be interessting to know what I did wrong in my setup.