AG_direcToy

AG_direcToy

AG_direcToy

AG_direcToy is an After Effects folder creation tool which employs predefined templates to build folder structure for multiple shots.  It is part of the AG_goBOX suite of tools, designed to assist ingest, and setup folder structure for different creative projects, and turn After Effects into an essential toolkit in the production pipeline.

 

 

Operation

After launching the floating palette, double click on any existing preset in the list, and a dialogue will prompt you for a location.  The script will next build a series of directory folders matching the template on your hard drive in the specified location, and avoid replacing any existing folders. Pre-existing folders with matching names are skipped.

If the Selected Shots checkbox is active, choose files, folders, or solids in After Effects, and double click on any existing preset in the list. A dialogue will prompt you for a location, and then the script will build a series of directory folders based on the selected item name using the template for the number of files you have selected.

Clicking the Edit Presets button opens a dialogue which allows a template to be saved, or modified.

Clicking the Edit Filters button opens a dialogue which allows a filter to be saved, or modified.

 

Screen Shot 2019-02-14 at 1.42.10 PM.png

 

 

Defining a Template Preset

Screen Shot 2019-02-14 at 1.42.26 PM.png

There are a few default presets, but new presets are easily defined using hierarchal folders in After Effects. All presets are stored in a shared preferences text file (in the same folder as the javascript), which can be modified in any text editing software —  easily updated, cleared-out if necessary, or shared with others.

The template file is not included, but default presets are baked into the software.  You must save a new preference file once you open the project, and it will override the built in system templates.

To build a new preset, select all the folders within a hierarchy in the After Effects project window, and click on Make Preset. This will read the relationships and names of the folders, and build a preset matching the text in the floating dialogue box. 

The hashtag, or pound sign (#) is a wildcard that will be replaced by the selected item name when executed. This hashtag can exist at any point in a template element, and it will be replaced.  The example below:

     shot1_#

          files

               precomp_#

AG_folderToy_sc5.png

Each line above represents a new folder, and its place in the hierarchy. Select all these folders to define the preset. 

While in the main panel, selecting an item called “myShot”, and double clicking on the resulting preset with the Selected Shots checkbox active — builds a series of folders  with the name shot1_myShot as the first folder, and so on.

 

Remove a Preset

The Remove Preset button deletes the selected preset, and the Rename button modifies the selected filter to match the text in the edit text field.

 

Testing a preset

While in the presets editing panel, double clicking on a defined template will build a series of folders in the project window, with the word “test” added to the end. This allows testing before actually writing files to the disk.  These folders can also be modified to build new templates.

 

 

 

Defining a Filter

Screen Shot 2019-02-14 at 1.42.45 PM.png

The script uses a series of filters to modify the incoming filenames to properly name the folders. It is possible to rename all the files directly for the desired output, but it is far more efficient to use filters to analyze the file names, if all your input is consistent. The filters use a regular expression engine to replace, remove, or add text while creating the folders from the selected file text.  These filters are also user defined, to work in naming structures from existing pipelines.  Please see Filter Template Structure below.

To build a new filter preset, select the Edit Filters button to open a new dialogue.  Type in a filter in the text box following the filter conventions noted in the Filter Template Structure, and click the Add Filter button.

Each filter must have at least three components:  The on/off switch, the function, and the pattern separated by colons(:) or the filter will not be created. See Filter Template Structure below.

The Remove Filter button deletes the selected filter preset, and the On/Off button toggles the filter to be active or inactive.

The On/Off button toggles whether or not the selected filter is active.

Double clicking on any filter will copy its text into the filter editing field, so you can modify the code and save a new filter to the list.

 

Saving Preferences

The Save Prefs button creates a text file on your hard drive in the same folder as the script — named AG_goBoxPrefs.txt.  This can be edited later if necessary.  It is recommended that any script from the AG_goBOX collection be in the same folder, so that this file can be combined with other script preferences. Storing the preset in this file, and not the standard Adobe Preferences is intentional, as the script is designed to work in environments where the Adobe Preferences files is not available to the user.

 

 

Preset Template Structure

If you have to edit your preferences file directly, this guide explains the template structure.

A template is stored in an array, and follows basic unix-style nomenclature to define its relationship to other folders.

Template example:

G_dt.foldLst[1] = [“Master Project”,”#_master_proj”,”source_files”,”/source_files/elements_#”,”/_reference”];

AG_folderToy_sc4.png