Commit Graph
119 Commits
Author SHA1 Message Date
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
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 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 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
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
redonion23andClaude Opus 5.5 b2cf845624 Scripting: key calls fetch only the key they need, so removeKey stays fast (#814)
Every key call (removeKey, keyTime, keyValue, setInterpolationTypeAtKey…)
looked its key up through `__keys()`, which serialised the whole key list,
eases and tangents included, on each call. Removing keys one by one was
therefore quadratic: about 100 ms per removeKey on a 2,000-key property.
The `keys` query now takes an optional `index` and returns just that key
with the count; `__key` uses it. removeKey on 2,000 keys drops from
103.7 ms to 0.4 ms (release, Windows 11 aarch64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 01:35:49 +02:00
Kristian MyramandClaude Haiku 5.5 b845562f4c #759: read the include test's file name on Windows
On Windows $.fileName is the full path with backslashes, so split('/') returned the whole path
and includes_are_inlined_relative_to_the_script failed. The test now takes the last part after a
backslash and then after a slash, with plain string splits: a regex split did not split the path
in the script engine.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-12 22:24:38 +02:00
Marco Arnulfo a179714108 Scripting: Google Earth Studio camera scripts key the camera (fixes #1077)
CameraLayer gets the transform and camera-options shortcuts (position, xRotation, zoom...) that AVLayer already had, and Convert Expression to Keyframes run without a property converts the selected ones, as app.executeCommand does it.
2026-10-12 22:02:59 +02:00
Moein Saharkhiz a27f9f54b9 #1063: render carriage-return text as separate paragraphs 2026-10-12 14:47:58 -04:00
Kristian MyramandClaude Haiku 5.5 2ef3d977a6 #808: sourcePointToComp and compPointToSource follow the layer's transform
Both returned their input unchanged. They now go through the layer's transform and its parents'
at comp time, and the inverse.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-12 19:19:13 +02:00
Vikram Bhaskaran f9808423d6 Cover keyframe interpolation and ease on effect parameters (#994)
setInterpolationTypeAtKey and setTemporalEaseAtKey act on effect parameters
(a Slider Control's slider and a 3D Point Control), not just transform
properties. Verified on current main; lock it in with a script regression
test driving the per-key methods through the property object.
2026-10-13 01:49:06 +11:00
Vikram Bhaskaran de26297c36 Sample footage pixels in script expressions (#1000)
A script reading an expression that calls sampleImage on a footage layer got
[0,0,0,0]: the script evaluator built its EvalCtx with EvalCtx::new, which
has no footage source, so the renderer substituted transparent frames (solids
and shapes stayed correct because they are procedural). Pass the session's
footage source, as the app's renderer and diagnostics already do.
2026-10-13 01:34:58 +11:00
Brandon Thomas b93e7b79e4 Merge pull request #895 from MarekSpodBiedry/issue-837
Scripting: text range selectors resolve by match name and limit the animator (#837)

# Conflicts:
#	crates/script/src/tests.rs
2026-10-12 04:20:47 -04:00
Brandon ThomasandClaude Opus 5.5 42ef79a2fd Media: movies opened in place keep their orientation (#796 × #827)
Opening movies in place (#796) skipped the whole-file bytes #827 read the
track matrix from, so the pool and the probe lost the turn for movies on
disk. stream::movie_header reads just the ftyp and moov boxes (bounded,
positional reads) and both in-place paths derive the orientation from it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 03:37:34 -04:00
Brandon Thomas 4dd74c4f6b Merge pull request #852 from Ni-zav/fix/815-text-path-matchnames-20261011
fix(script): expose After Effects text Path Options matchNames

# Conflicts:
#	crates/script/src/tests.rs
2026-10-12 03:23:27 -04:00
Brandon Thomas 6caa67971b Merge pull request #851 from Ni-zav/fix/811-script-object-identity-20261011
fix(script): preserve item and layer wrapper identity

# Conflicts:
#	crates/script/src/tests.rs
2026-10-12 03:23:26 -04:00
Brandon Thomas 2599237ef5 Merge pull request #850 from Ni-zav/fix/838-script-importas-psd-20261011
fix(script): respect ImportOptions.importAs for layered PSD files

# Conflicts:
#	crates/script/src/tests.rs
2026-10-12 03:23:24 -04:00
Brandon Thomas b7e85034ab Merge pull request #849 from Ni-zav/fix/840-extendscript-substr-20261011
fix(script): implement ExtendScript String.substr compatibility

# Conflicts:
#	crates/script/src/tests.rs
2026-10-12 03:23:23 -04:00