AutoSkill 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.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/after-effects-batch-text-comps-generator" ~/.claude/skills/ecnu-icalk-autoskill-after-effects-batch-text-comps-generator-afafdd && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/after-effects-batch-text-comps-generator/SKILL.mdsource content
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 (
) that contains a text layer named exactly "01".CompItem - 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
and\r\n
).\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
property value with the corresponding text block string.Source Text
- Error Handling & Undo:
- Wrap the main execution in
andapp.beginUndoGroup
.app.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
or.map()
on the result of.filter()
without verifying the result is an array to avoid ExtendScript compatibility issues (use standard.split()
loops if necessary for robustness).for
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