132 Commits
Author SHA1 Message Date
Brandon Thomas 7c99ba6eeb Merge pull request #1696
# Conflicts:
#	contributors/people.toml
2026-10-18 09:36:05 -04:00
Brandon Thomas 30efc87a2a Merge pull request #1694 2026-10-18 09:35:34 -04:00
Brandon Thomas 12d8e13bae Merge pull request #1406 2026-10-18 09:35:33 -04:00
Brandon Thomas 6d4837c08b Merge pull request #1362 2026-10-18 09:35:33 -04:00
Brandon Thomas b72425a28d Merge pull request #1334 2026-10-18 09:35:33 -04:00
Brandon ThomasandClaude Opus 5.5 bba7abd224 Build: gate tests_services with a plain cfg(test) so clippy treats it as test code
clippy's allow-unwrap-in-tests only recognises #[cfg(test)], not cfg(all(test, ...)),
so cargo xtask ci failed on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:15:45 -04:00
NetterSilverandClaude Haiku 5.5 1ad17f608b Resolve Microsoft font names to installed metric-compatible fonts
Fixes #1677

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:50:29 +02:00
Ayberk A. ab8af6ae95 test(script): per-key methods in another comp leave both key selections alone (#1531)
The worse half of #1531: when the property's comp remembers a key the user
selected, the old code didn't just do nothing, it eased, held or removed
that selected key instead of the one named. This test, written by
@switch87 in #1558, pins it: only the named keys change, removeKey(1)
removes key 1, the active comp stays active with its own key selection,
and the other comp's remembered selection comes back as it was. It fails
on the code before #1558 and passes on main.
2026-10-17 00:13:27 +03:00
BFlat 901d54c55f Merge pull request #1594 from rahal/fix/script-host-files
fix(web): scripts can open files in browser storage; stored footage isn't reported missing (#1593)
2026-10-16 19:04:06 +07:00
BFlat 457b0e3c7a Merge pull request #1647 from storytold/fix/script-access-windows-prefix
Scripts: the project-folder check compares Windows paths in one form
2026-10-16 19:03:55 +07:00
BFlat 8e96fdd0fc Merge pull request #1351 from DWAA1660/fix/1246-script-confirmed-flag
Scripts: a script can't confirm executing a file for itself (#1246)
2026-10-16 19:01:15 +07:00
BFlat 5c02fe902f Merge pull request #1558 from AyberkA0/script-keys-closed-comp
fix(script): per-key methods act on keys outside the active comp (#1531)
2026-10-16 19:00:16 +07:00
bflatasticandClaude Opus 5.5 a8bbcd3aa2 Scripts: the browser-storage test runs where /browser paths are absolute
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:56:18 +07:00
bflatasticandClaude Opus 5.5 4d8f88302d Scripts: the project-folder check compares Windows paths in one form
normalize() canonicalizes whatever part of a path exists, which on Windows adds
the verbatim prefix to some paths and not others, so a file under a folder
that isn't on disk failed the project-folder check against an existing
project folder. The check failed closed (access refused); it now drops the
prefix from canonical drive paths so both sides compare.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 18:53:59 +07:00
BFlat 04a60d7747 Merge pull request #1311 from MarekSpodBiedry/issue-1263
Scripting: add the missing app.preferences.saveToDisk() so imported scripts like Duik get past startup (#1263)
2026-10-16 18:12:02 +07:00
BFlat c133e09e37 Merge pull request #1371 from marcoarnulfo/fix/layer-property-shortcuts
Scripting: test that Layer.property() resolves AE's top-level shortcuts
2026-10-16 18:09:39 +07:00
rahal 228ceb308e fix(web): scripts can open files in browser storage; stored footage isn't reported missing
In the browser editor a .jsx script couldn't open any file, even one the
page holds next to the project: File.open("r") returned false with "File
not found" and File.exists was false. The footage check after File > Open
also marked imported media as missing.

Both asked whether a file exists on the local disk (std::fs), which has no
files on wasm32:
- scripts read files through Session.services but checked existence with
  std::fs (File.open's access check, File.exists, Folder.exists); they now
  ask services.exists / services.is_dir, after the folder check;
- WebServices kept the default exists (std::fs); it now looks in the file
  table.

Desktop and CLI are unchanged (FsServices keeps the std::fs defaults).
Tests: script tests_services (a host with in-memory files), web smoke
step hostFiles (a script reads a stored file, footage check finds stored
media).
2026-10-15 17:08:01 +01:00
Ayberk A. 9635321f1a fix(script): per-key methods act on keys outside the active comp (#1531)
`exec_on_keys` put the named keys in the key selection, then `exec` made
the keys' comp active. Since comps keep their own selections (#1037),
activating the comp stored the injected keys with the comp that had been
active and brought back the target comp's own key selection, usually
empty, so `keys.interpolation` and `keys.velocity` had nothing to act on:
setInterpolationTypeAtKey and setTemporalEaseAtKey were silently ignored
in any comp other than the active one. The keys' comp is now made active
before the keys are selected, and the comp that was active comes back
afterwards, as `exec` does for its own target (now `leave_comp`).
2026-10-15 14:42:50 +03:00
Marco Arnulfo 1b44c5c98a Scripting: Stroke and Hue/Saturation parameters use After Effects' match-name numbers (part of #1405) 2026-10-14 09:15:12 +02:00
Marco Arnulfo dd5afffee3 Scripting: test that Layer.property() resolves AE's top-level shortcuts (#1348) 2026-10-14 00:55:12 +02:00
DWAA1660andClaude Opus 5.5 da73df4b2e Script sockets: per-socket locks, a write deadline, and close interrupts (#1248)
Every socket operation locked one global table and held it through the
blocking write_all/flush, and streams had no write timeout (accepted
ones were explicitly blocking). A peer that stopped reading kept the
script blocked for good, and every other socket call, close included,
waited behind it.

- The table maps handles to Arc<Entry>, each with its own Mutex<Sock>.
  The table is locked only to look a socket up, add or remove one,
  never during network I/O, so one stalled socket doesn't hold up the
  others.
- `write` sets a write timeout from the socket's `timeout` (10 s by
  default, as reads) and reports "write timed out … the other side
  isn't reading" instead of blocking. Failures to set the read or write
  timeout, or to make an accepted stream blocking, are reported instead
  of ignored.
- `close` removes the socket and shuts its stream down through a second
  handle, so a call blocked on it fails at once.

Tests (socket.rs, native only): a 64 MB write to a loopback peer that
never reads fails with "timed out" after a 1 s timeout; while one socket
is blocked writing, another answers at once, and closing the blocked one
returns at once and ends its write. Both fail on main (the write never
gives up; the second socket waits on the table lock).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 16:03:53 -06:00
DWAA1660andClaude Opus 5.5 7a9ca5810a Scripts: a script can't confirm executing a file for itself (#1246)
With Warn User When Executing Files on, file.executeFile asks the
frontend first, and the frontend's answer re-runs it with
`confirmed: true`. That flag was taken from the parameters whoever
called, so a script could pass it itself (app.run('file.executeFile',
{path, confirmed: true}), also inside engine.batch) and the file opened
without the question, as long as the user had allowed file and network
access.

`confirmed` now counts only when the command isn't running for a script
(Session::running_for_script, which #590 uses for the same reason and
which stays set through nested batches). A script's request always gets
the question; the user's answer from the frontend's form still opens
the file; with the warning off nothing changes. The permission gate
itself is unchanged.

Tests: engine a_script_cannot_confirm_executing_a_file_for_itself
(execute_for_script directly and through engine.batch; the frontend's
confirmation; warning off) and the same through real JavaScript in the
script crate (app.run, app.run('engine.batch'), File.execute()). Both
fail on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 14:47:51 -06:00
Kristian MyramandClaude Haiku 5.5 fdc515f5be #1063: find an undefined name's first use from the failing frame on
A ReferenceError's first use was searched across the whole file, so a mention
earlier in a comment, a string or another function could report the wrong line.
The search now starts at the innermost script frame's line, and covers the whole
file only when there is no frame. Follow-up to storytold/effectcraft#1161.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-13 21:58:52 +02:00
tylerjenningsw 4dddb34cba Ease Presets: tests for Out alone through undo and redo, and a single key on a curved path (#1329)
Out on an auto-Bezier key leaves its in side playing the same values,
and undo and redo restore each state. On a curved Position path with
unequal segment lengths and durations, In sets the key's speed from the
incoming path length, playback arrives faster than a constant speed, and
the out side plays as before.
2026-10-13 15:04:19 -04:00
tylerjenningsw 9b74dba2a8 Ease Presets: skip roving keyframes and say so, rather than reporting them eased (#1329)
A roving key passes speed straight through: the engine keeps both its
sides linear whenever the keys are edited (retime_roving), so an ease set
on one never plays. The panel still counted it as eased, so a selected
roving key showed "Eased 1 keyframe(s)" and stayed linear. The previous
pair-only panel did the same to a pair holding a roving key.

Selected roving keys are now left out of the work and counted. The
status names how many were skipped and that turning off Roving lets them
ease; when nothing else was selected, nothing changes and no undo step
opens. Fixed keys next to a roving key still ease.
2026-10-13 15:04:19 -04:00
tylerjenningsw af486dc44a Ease Presets: tests for easing single keyframes In, Out and In-Out (#1329)
One middle key between unequal segments in each mode, with its
neighbours, times, values and selection unchanged and one undo restoring
it; first and last keys, keys that aren't neighbours and keys of several
properties; no undo step when nothing can ease; a Hold and an
auto-Bezier side kept as they play; per-dimension and motion-path
speeds on Scale and Position; and the pair's outer sides under In-Out
and Out. All but the unchanged API tests fail on main.
2026-10-13 14:28:50 -04:00
tylerjenningsw 3a953859f2 Ease Presets: ease the incoming, outgoing or both sides of selected keyframes (#1329)
The panel eased only pairs of neighbouring selected keyframes, so a single
selected key (or keys that aren't neighbours) changed nothing.

An Ease selector (In, Out, In-Out; In-Out by default) now chooses the
sides of each selected key to ease. In eases a key's incoming side with
the curve's in side, Out its outgoing side with the curve's out side. A
side is eased when it has a neighbouring key, selected or not; the
neighbour is left as it is. Each side's speeds scale to the segment on
that side, so a key between a +100/s and a -40/s segment gets each its
own. The side not eased keeps playing as it did (easeSide, unchanged).

Sides are measured before any key changes, and no undo step opens when
no selected key has a segment on the chosen side; the status says which
neighbour is missing. A selected pair in In-Out still gets the whole
curve; its outer sides now ease too when they face an unselected key.
From Keys still reads the curve of a selected pair.
2026-10-13 14:28:49 -04:00
MarekSpodBiedry 9050b1818e Scripting: add the missing app.preferences.saveToDisk() so imported scripts like Duik get past startup (#1263) 2026-10-13 18:02:11 +02:00
Brandon ThomasandClaude Opus 5.5 3ac283eee4 Review fixes for the landed batch
- Cryptomatte (#1183): planes shorter than the image read as empty instead of panicking.
- layer.addMarker (#1180): a comp marker no longer replaces one at the same time.
- Desktop (#1005): ignore macOS's -psn_ argument instead of refusing to launch.
- Doc comments put back on their own items (#1153, #1037).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 04:47:52 -04:00
Brandon Thomas bb4972a886 Merge pull request #1160 from nanox333/fix/1063-levels-alpha-name
# Conflicts:
#	crates/script/src/tests.rs
2026-10-13 04:35:20 -04:00
Brandon Thomas 286a521598 Merge pull request #1037 from vbasky/fix/1001-selection-persist
# Conflicts:
#	crates/engine/src/lib.rs
2026-10-13 04:34:34 -04:00
Brandon Thomas 6ffb2823c7 Merge pull request #1188 from redonion23/fix/816-save-frame-to-png 2026-10-13 04:29:17 -04:00
Brandon Thomas fa5ce34012 Merge pull request #1119 from marcoarnulfo/fix/ges-jsx-keyframes
# Conflicts:
#	crates/script/src/tests.rs
2026-10-13 04:29:06 -04:00
Brandon Thomas 0e4f3bfb8f Merge pull request #1043 from vbasky/fix/1000-sampleimage-footage
# Conflicts:
#	crates/script/src/tests.rs
2026-10-13 04:28:50 -04:00
Brandon Thomas ee682bbfd9 Merge pull request #1172 from redonion23/fix/815-stroke-dash-matchnames
# Conflicts:
#	crates/script/src/tests.rs
2026-10-13 04:28:45 -04:00
Brandon Thomas 092834b703 Merge pull request #1156 from redonion23/fix/814-removekey-linear 2026-10-13 04:28:44 -04:00
Brandon Thomas e4532bff1e Merge pull request #1124 from nanox333/fix/759-include-test-windows 2026-10-13 04:28:38 -04:00
Brandon Thomas a55155bd7d Merge pull request #1191 from redonion23/fix/813-footage-proxy-scripting 2026-10-13 04:28:34 -04:00
Brandon Thomas 66be8857b5 Merge pull request #1162 from nanox333/fix/1063-light-casts-shadows
# Conflicts:
#	crates/script/src/tests.rs
2026-10-13 04:28:33 -04:00
Brandon Thomas 5c0ac48f31 Merge pull request #1123 from nanox333/fix/808-source-point-convert
# Conflicts:
#	crates/script/src/tests.rs
2026-10-13 04:28:30 -04:00
Brandon Thomas 39ef24af3a Merge pull request #1093 from moecr7/codex/fix-1063-text-line-breaks 2026-10-13 04:28:28 -04:00
Brandon Thomas b77018ea8f Merge pull request #1161 from nanox333/fix/1063-undefined-name-location 2026-10-13 04:27:32 -04:00
Vikram Bhaskaran c46f80faa2 Store each comp's layer selection on its own.
A single selected_layers list kept ids from every comp, so the active comp looked selected whenever another comp was. Opening a comp and running a script against a different comp now park and restore that selection.
2026-10-13 17:46:02 +11:00
Vikram Bhaskaran 8c986a1bec Keep closed comps' layer selections across scripts (#1001)
sanitize_state dropped every selected layer not in the active comp at the
end of each script run, so a layer selected by script in a comp that was not
open was gone by the next script call. Every comp keeps its own selection as
in After Effects; only ids gone from every comp are dropped now. UI and
engine lookups resolve selections per comp and tolerate foreign ids.
2026-10-13 17:39:16 +11:00
redonion23andClaude Opus 5.5 004984d853 Scripting: footage proxies, replaceWithSequence and mainSource.conformFrameRate (#813)
FootageItem had no replaceWithSequence, setProxy, setProxyWithSequence or
setProxyToNone, useProxy and proxySource were fixed stubs, and mainSource
was a new object on every read with no conformFrameRate. They now run the
existing commands (file.replaceFootage, file.setProxy, file.useProxy,
file.setProxyNone, file.interpretFootage); the item info reports the proxy
and the conform/native frame rates, and mainSource is one live
FootageSource per FootageItem. replaceSource is not covered: it needs an
engine command that changes a layer's source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 05:59:10 +02:00
redonion23andClaude Opus 5.5 a96c80788a Scripting: CompItem.saveFrameToPng writes the frame as a PNG (#816)
After Effects scripts save a comp frame with saveFrameToPng(time, file);
EffectCraft only had the comp.saveFrameAs command, so the method was
undefined. It now runs comp.saveFrameAs at the given comp time, after the
same file-gate check as other script writes (Allow Scripts to Write Files).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 04:32:48 +02:00
redonion23andClaude Opus 5.5 f816cd5e38 Scripting: a stroke's Dashes use After Effects' match names (#815)
Dashes reported its children as `dash`, `gap`, `offset`, so
`property("ADBE Vector Stroke Dash 1")` was null and addProperty threw.
They now report ADBE Vector Stroke Dash 1-3 / Gap 1-3 / Offset.
addProperty with one of those names returns the existing property
(EffectCraft's Dashes always holds Dash 1, Gap 1 and Offset) or adds the
Dash/Gap 2 or 3 pair through shape.dashes.add. Lookups by the old ids
still work.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 03:04:12 +02:00
Kristian MyramandClaude Haiku 5.5 5530560fb8 #1063: find a light's Casts Shadows option by its After Effects name
A script asks a light's options for "ADBE Casts Shadows", which returned null. The light's option
is named "Casts Shadows" here, so the lookup never matched. The name is now an alias for the
castsShadows property, and a regression test checks the lookup returns the property.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-13 01:53:35 +02:00
Kristian MyramandClaude Haiku 5.5 64945f2ef9 #1063: report an undefined name at its first use inside a function wrapper
Inside a function wrapper such as (function () { ... })(), boa places a ReferenceError at the start of
the function, so a script's error was reported at the wrapper's first line rather than the line that
failed. The first use of the undefined name in the code is now the position, and boa's frames remain
the fallback. Thrown errors and object-model errors already report their own lines. A regression
test covers a thrown error, an undefined name, and an object-model error inside a wrapper.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-13 01:44:14 +02:00
Kristian MyramandClaude Haiku 5.5 5e97eaddba #1063: find a Levels alpha control on the effect by its name
Pro Levels2 keeps its Alpha controls one group down, under Alpha, and a script's
effect.property("Alpha Input White") only searched the effect's direct children, so it returned null.
The lookup now searches the groups nested below the direct children, up to three levels, after the
direct match fails. Direct children keep their priority. A regression test checks the name on the
effect and the same control through the Alpha group.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-13 01:41:22 +02:00