Repository navigation
Versions localization and reformat
Three tools that make many comps from one, and check every one of them. Nothing is built in: every format, colour, size, margin and limit comes from your data and your rules. When a rule can't be met, the report says FAIL and why; the AI doesn't decide for you.
| You ask | The tool |
|---|---|
| "Make a version of Score Card for every row of scores.csv, and check each one before you queue them." | ae_versions_from_data |
| "Export the texts for the Hebrew and French translators. When they come back, fit them: tracking down to -40, never below 36 px." | ae_localize |
| "Make a 9:16 of Promo. Logo pinned 80 px from the top, titles inside title-safe." | ae_reformat |
All three make their changes in one undo step with a Changes list, can save a checkpoint first,
have a dryRun that changes nothing, and refuse to overwrite names or files that already exist unless
overwrite: true.
ae_versions_from_data turns a CSV or JSON file (or rows in the chat) into versions of a template comp, then
checks every row.
Mapping. Each column goes to a layer of the template comp, or to an Essential Graphics controller:
- text;
- a number in your format: decimals, decimal and thousands separators, prefix, suffix, how negatives are written;
- a colour from the cell, or from your rules (for example "below 0: #C62828, otherwise #2E7D32");
- a footage file that replaces the layer's source;
- any property value;
- a bar's on-screen width or height, through your value-to-pixels mapping (for example 0 → 0 px, 100 → 800 px).
Names come from a pattern like {comp} - {City}.
Two modes.
-
duplicate(layer targets) duplicates the comp per row. Duplicating a comp doesn't duplicate the precomps inside it, so every version shares them: targets must be layers of the template comp itself. -
essentialGraphics(controller targets) makes a comp per row with the template as a precomp and sets that row's Essential Graphics values. A row's layout can't be measured there, so the layout checks don't run.
Every row is checked. Each value is read back where it renders, with expressions applied:
- the text shows exactly the formatted string, and the colour is what the rule says;
- paragraph text doesn't overflow its box, and the mapped text stays inside the frame (or title- / action-safe with your margins) on every frame, measured with Preflight's own code;
- characters the font has no glyph for, and missing fonts, fail the row;
- bars are measured on screen (through parents) against your mapping, within a tolerance you set;
- footage files must exist.
The report: a verdict (FAIL (n of m rows), INCOMPLETE, WARNINGS or PASS), totals, then one line per row.
A check that didn't run (an older After Effects, a layer not visible at the checked time, Essential Graphics mode)
makes the row INCOMPLETE, never PASS.
Rendering (optional). queue adds every version to the render queue with your output module template and a
path pattern (/renders/{City}_{#3}.mov). render: true renders only the versions that pass.
ae_localize takes a comp's texts to translators and back, with every language checked.
Export (action: "export"): every text layer of the comp and its precomps (visible or not; keyframed Source Text
per keyframe), as
- CSV for Excel: UTF-8 with a BOM, so Hebrew and Arabic open correctly; one column per language; or
- XLIFF 1.2 for CAT tools (Trados, memoQ, Phrase…), one file per language. XLIFF 2.0 files are read too.
Each string carries its context: comp and layer, time on screen, the paragraph box or the room a point text has to
the edge of the frame (or your safe area), a character limit (yours, or estimated from the box with
maxChars: "fromBox") and your notes.
Import (action: "import"): one version per language. The comp and every precomp that holds a translated text
are duplicated, the copies using each other ("{comp} [{lang}]").
Fit by your rules, never invented. Only the adjustments you allow, in your order:
- tracking down to a minimum;
- font size down to a minimum, or a minimum cap height in comp pixels, measured on the font;
- horizontal scale down to a minimum;
- the paragraph box growing by at most so many pixels, away from the edge the text is aligned to;
- point text within a width you give.
Each step goes only as far as needed. A text that still doesn't fit is left at the best attempt and FAILs with what was tried; nothing goes below your minimum. Without rules, nothing is adjusted.
Right to left. Hebrew, Arabic, Persian, Urdu and Yiddish (by the language code, or direction) get right-to-left
paragraph direction and the Universal composer (After Effects 24.0 or later), and their alignment is mirrored (left
becomes right); a point text whose alignment flips keeps its place. You can set a font per language
(fonts: {"he": {"*": "YourHebrewFont"}}).
Checks per language, worded like Preflight (FAIL (1 of 3 languages), INCOMPLETE, PASS): each text read back
where it renders, the fit, the direction, box overflow, text inside the frame or safe area on every frame, missing
glyphs (the common Hebrew and Arabic problem: a Latin font without those letters) and missing fonts. Untranslated
strings FAIL, or warn with allowUntranslated: true.
Drift (action: "drift"): which master texts changed since the export, per language. The import warns about
them too.
ae_reformat makes the comp at another size (16:9 to 9:16, 1:1, 4:5 or any size) by rules you set, then checks
the result on every frame. No presets and no "smart crop".
Rules:
- background layers that must cover or fit the new frame;
- layers that must stay inside title-safe, action-safe or the frame, with your margins;
- layers pinned to an edge or corner, with a margin in px;
- which layers may scale and how far (a range in % of their size);
- a minimum text cap height;
- layers to switch off.
Layers are named exactly or with wildcards (Logo*). A layer no rule names keeps its offset from the frame centre,
as After Effects' own Composition Settings resize does with the centre anchor.
The edit is a duplicate of the comp; the source is never changed. Position and Scale keys are mapped by the same
move and scale, with spatial tangents and ease speeds scaled too, so the motion keeps its shape. Parented layers move
in their parent's space, a track matte moves with its layer, 3D layers move with the frame centre. Precomps are reused,
unless a rule names a layer inside a full-frame precomp: then that precomp is duplicated and reformatted too, and the
report says why (precomps: "reuse" or "duplicate" to choose).
The check: Preflight's project checks on the new comp (your safe-area rules and cap height, on every frame or every Nth), plus cover / fit and pins, plus the plan against what After Effects actually made. The verdict is Preflight's: PASS, FAIL (n), INCOMPLETE or WARNINGS (n).
When a rule can't be met (a title too wide for 9:16 without going below the minimum cap height, a pin that conflicts with title-safe), the layer keeps the best attempt and the report says FAIL, with the reason and what you could decide: a shorter text, a line break, a smaller minimum, another scale limit.
- Text checks that need a newer After Effects (paragraph overflow 24.6, missing glyphs 25.1) are reported as not run on older versions, and make the verdict INCOMPLETE.
- Right to left: paragraph direction, the composer and alignment are set. Mirroring the layout itself, kashida justification and per-character direction are not available to scripts.
- In
essentialGraphicsmode, a version's layout can't be measured.
Start here
Using Surehand
- The Surehand panel
- Approvals
- What the AI can do
- Precision tools
- Checkpoints
- Proven edits
- Project history
- Project X-ray
- Precomp surgery
- Preflight
- Stress test
- Versions, localization and reformat
- Rendering
- Render speed, handoff and farms
- Chat in After Effects
- In-chat views
Reference
Developers