v0.145.4Internal beta docs

Beta documentation · eXLib v0.145.4. Public release is pending.

What Happens at Apply

A variable is an apply-time slot: a property wire splices in raw AE source, a control-bound variable is deferred until the control that gets created for it exists, and anything still unresolved is named rather than emitted as a raw placeholder into After Effects. With the default checking level, Apply first opens Connect variables when a choice is still needed. This page describes that resolution exactly, and the two paths — Library row and editor — that reach it differently.

Resolution order

Every apply path — the Library's apply, its broadcast apply, its audition, and the IDE toolbar's apply — resolves {{token}} placeholders through one shared substitution step, so the same rules apply no matter which surface you applied from:

  1. A variable wired to a property substitutes as raw AE source — a genuine reference, not a quoted string, so it keeps working exactly as if you'd typed it by hand.
  2. A variable wired to a new control is deferred until the control that will hold it actually exists, then spliced in with that control's real, collision-safe reference. One delivered as Layer Control · keep .tail splices the same way with the kept path appended after it — thisComp.layer(1).transform.position, the new Layer Control's own reference followed by the path that was kept. Only the path that creates controls can do this — see below.
  3. Anything else — an unresolved wire, or a placeholder with no variable behind it — refuses the apply rather than guessing.

Applying from a Library row versus from the editor

The two apply paths differ in a way that matters:

  • From a Library row, Apply resolves every variable to its authored default, creates any declared effect controls on the target layer (auto-resolving name collisions — AE may rename on conflict), or generates one pseudo effect when delivery is set to it, then sets the expression and reports AE's real verdict along with exactly which controls were created.
  • From the editor (the toolbar, ⌘/Ctrl+Enter, or the Compact panel), Apply resolves from the active session's live wiring. A New control wire now uses the same control-creating host path as Library Apply: eXLib creates the controls on the selected target layer or layers, substitutes their real collision-safe names, and writes the expression in one undo group. A pinned property can receive a source-only apply, but cannot be the destination for newly created controls because the pin does not identify a durable layer; unpin it or use Link property.

In both cases, a single Cmd+Z in After Effects undoes the entire operation — controls and expression together. If any step fails partway through a Library apply, every control created so far is removed and the original expression is restored exactly, then verified before eXLib reports back.

Connect variables before Apply

With Errors only checking (the default), Apply opens Connect variables for a missing or not-yet-verifiable source. Guide shows every variable for confirmation, including ready ones. Expert and Leeroy skip the prompt; unresolved source still fails closed later rather than becoming raw {{token}} text.

Every pending Ask on apply row opens already set to Link property—you do not have to make that intermediate choice. If its captured origin already looks like a property reference, the field is prefilled; otherwise you can type a path or click the pickwhip button beside the field. The picker shows the live comp hierarchy and returns an absolute path, or a same-layer-relative path when you hold Alt.

When the expression establishes a type, the chooser uses it as advice:

  • For a 2D variable, compatible 2D properties stay emphasized. 1D, 3D, color, text, layer, and unknown/group candidates remain selectable but are dimmed and carry a small warning triangle with the reason.
  • The New control menu follows the same rule: Point Control is emphasized for 2D, while incompatible Slider, Angle, 3D Point, Color, and other kinds remain selectable but dimmed and explained.
  • When the type is still TBD, nothing is falsely presented as compatible or incompatible.

The summary counts what is ready and the main Apply button unlocks when nothing is missing. Opening and cancelling the dialog does not silently rewrite an Ask row; edits you deliberately make are retained. The edited targets are resolved again immediately before the commit, so an invalid final link fails closed instead of applying unresolved source.

A {{placeholder}} with no declared variable cannot be repaired by a row in the dialog and still refuses by name. A refusal toast names the exact token and reason—never a generic failure—and eXLib never substitutes a captured literal or authored default where you asked for a live control.

Refusals are derived from placeholders actually present in the source text, not merely from the session's row list, so a variable whose placeholder you deleted cannot raise a false alarm.

Screenshot pending

Connect variables with a 2D Ask-on-apply row and its property picker open: compatible 2D properties stay clear; incompatible dimensions stay selectable but dim with a warning triangle.

Screenshot pending

The same 2D row with the New control menu open: Point is emphasized, while incompatible controller kinds remain selectable, dimmed, and explained.

Ask on apply

"Ask on apply" is one of the three target kinds a variable can be wired to—deliberately deferred until Apply rather than pre-set. A variable added by hand starts here, and any variable's wire can be moved back to this port at any time. In the Connect dialog it is projected locally onto the actionable Link property choice, with the real pickwhip and manual path field available immediately; you can also change it to New control and choose a compatible kind. From a Library row, authored defaults remain the reusable template values.

The Applying settings section

Settings has a dedicated Applying section, kept separate from Diagnostics because it governs Apply's own gate — how much checking happens before a Variables session's controls actually get created and the expression gets set — rather than the editor's live squiggles. See Settings, Section by Section for the full settings tour.