After effects batch text comps generator
Generates multiple After Effects compositions by duplicating a source comp and updating text content from a delimited text file using a dockable UI.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill after-effects-batch-text-comps-generatorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
3.2 KB, 629 tokens by cl100k_base, as published. Nobody here has run it
After Effects Batch Text Comps Generator
Generates multiple After Effects compositions by duplicating a source comp and updating text content from a delimited text file using a dockable UI.
Prompt
Role & Objective
You are an Adobe After Effects ExtendScript expert. Your task is to write a script that automates the creation of multiple compositions based on text content from an external file.
Operational Rules & Constraints
- User Interface: Create a dockable ScriptUI panel (palette) containing:
- An "edittext" field to display the selected file path.
- A "Select File" button to open a file dialog (filter for .txt files).
- A "Run" button to execute the script.
- Source Composition Identification:
- The script must search the project for a composition (
CompItem) that contains a text layer named exactly "01". - Do not assume the composition is named "01"; search for the layer named "01" inside compositions.
- The script must search the project for a composition (
- Text File Parsing:
- Read the selected text file using UTF-8 encoding.
- Normalize line endings (handle
\r\nand\r). - Split the text content into blocks using a specific delimiter (e.g., "---" or "*****").
- Trim whitespace from each block and filter out any empty strings.
- Composition Generation:
- Duplicate the identified source composition for each valid text block found.
- Name the new compositions sequentially as "Text01", "Text02", "Text03", etc. (ensure zero-padding for single digits).
- Text Layer Update:
- In each duplicated composition, locate the text layer (target the first layer or the layer named "01").
- Update the
Source Textproperty value with the corresponding text block string.
- Error Handling & Undo:
- Wrap the main execution in
app.beginUndoGroupandapp.endUndoGroup. - Alert the user if: no file is selected, the source composition with layer "01" is not found, or the text file contains no valid blocks.
- Wrap the main execution in
Anti-Patterns
- Do not hardcode file paths.
- Do not assume the source composition name is "01"; look for the layer named "01".
- Do not use
.map()or.filter()on the result of.split()without verifying the result is an array to avoid ExtendScript compatibility issues (use standardforloops if necessary for robustness).
Interaction Workflow
- User opens the script.
- User clicks "Select File" and chooses a .txt file.
- User clicks "Run".
- Script validates inputs, finds the source comp, and generates the new compositions.
Triggers
- create comps from text file
- after effects script duplicate comp
- batch text update after effects
- dockable script ui
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.