4377 Commits
Author SHA1 Message Date
dotCooCoo 8ee9bc144b Keep failed scripts and selected panels out of recent script history 2026-10-27 11:06:19 -07:00
tylerjenningsw 8c7990c65f Merge remote-tracking branch 'origin/main' into fix/expression-value-color
# Conflicts:
#	crates/ui-egui/src/panels/effect_controls.rs
2026-10-27 14:05:11 -04:00
Anubhav RaiandClaude Opus 5 14b345c333 engine: a template's footage entry can't name a file outside the folder (#2123)
EffectCraft writes its own templates as `media/<item id>/<file>` entries, and
extraction trusted both halves. `base_name` splits on `/` and `\`, but the item
id was taken with `split('/')` alone, and it is pasted in front of a base name
another item already used. So a second `media/..\..\..\Startup\x/clip.mp4`
entry became `<dir>/..\..\..\Startup\x-clip.mp4`, which on Windows is three
folders up, with the attacker choosing how the name ends.

The id is now used only when it is one, and the name goes through
`safe_file_name`: separators, drive colons and NUL become `_`, and `.` / `..`
become `footage`. Reached from `templates.create` with `path`, from File ▸ New
from Template, and from a template dropped in the user Templates folder.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-27 23:34:41 +05:30
tylerjenningsw 95ee400ab2 Expressions: test that a change to Object.prototype doesn't reach the kept layers 2026-10-27 14:04:10 -04:00
tylerjenningsw 2eefced49b Expressions: the kept layers' maps have no prototype 2026-10-27 14:04:10 -04:00
tylerjenningsw e7cf022a7d Expressions: test that the kept layers are bounded 2026-10-27 14:04:10 -04:00
tylerjenningsw ad6b87c60d Expressions: the kept layers are bounded like the runtime's scripts 2026-10-27 14:04:10 -04:00
tylerjenningsw 2f2ebbdedb Expressions: test that deleting or redefining thisLayer and thisComp doesn't reach the next evaluation 2026-10-27 14:04:10 -04:00
tylerjenningsw ecb8dadde5 Expressions: an expression can't delete or redefine thisLayer, thisComp or the other unqualified names 2026-10-27 14:04:10 -04:00
tylerjenningsw d81716bfb6 Expressions: test that an expression can't change the prelude for the next one 2026-10-27 14:04:10 -04:00
tylerjenningsw b2fb5f4e5f Expressions: an expression can't change the prelude for the evaluations after it 2026-10-27 14:04:10 -04:00
tylerjenningsw 0860c7e03d Expressions: an expression can't delete a kept layer's fields 2026-10-27 14:04:10 -04:00
tylerjenningsw f4a4d76f2a Expressions: test that a kept layer's own fields don't carry over to the next evaluation 2026-10-27 14:04:10 -04:00
tylerjenningsw 5c23bda95d Expressions: an expression can't change which layer a kept layer is 2026-10-27 14:04:10 -04:00
tylerjenningsw 754ed2fe84 Expressions: test that a kept layer reads the project again in each evaluation 2026-10-27 14:04:09 -04:00
tylerjenningsw 7c0ba4ef1d Expressions: a layer is made once per runtime and reads its info again in each evaluation 2026-10-27 14:04:09 -04:00
tylerjenningsw ca590aaead Expressions: a layer is made once per evaluation, and only functions are checked for being one
A Layer is now a callable function with its own prototype, which costs
more to make than the plain object it was. __layer(c, l) makes each
layer once per evaluation (kept in __S, which __begin resets), so an
expression naming the same layer many times builds it once. That covers
thisComp.layer(...) in a loop, .parent, a Layer Control's value and
thisLayer.

The checks for a layer (the result, thisComp.layer(layer, offset), the
property proxy) read __isLayer only on functions. Numbers and other
primitives are no longer boxed to look the property up.

Timing (release, Windows, medians of 2000 evaluations, PR vs main):
- one evaluation building one layer: about 22 vs 16 us;
- thisLayer.transform.opacity: about 200 vs 170 us;
- 20000 thisComp.layer(1) lookups in one evaluation: 95 vs 138 ms.
2026-10-27 14:04:09 -04:00
tylerjenningsw 3f88c72a43 Expressions: a layer is a callable property group
In After Effects a layer is a property group: thisLayer("transform"),
thisComp.layer("Other")("effects")("Blur"), thisLayer(1). In
EffectCraft's expression runtime a Layer was a plain object, so those
failed with "TypeError: not a callable function", including the
references the pick whip writes with Compact English off
(thisComp.layer("Other")("effects")("ec.noise.fractal")(...)).

A Layer is now callable like a property group (built as __mkGroup
builds groups), looking up its own properties by match name, name or
index, and keeps its methods, name and index. The places that took a
layer for a plain object (the result reading as the layer's index,
thisComp.layer(layer, offset), a Layer Control's value handed through
the property proxy) accept it.

Test: layers_are_callable_property_groups (fails before).
2026-10-27 14:03:59 -04:00
tylerjenningsw 238361e59f Menus: a pointer coming back into the window over another title switches menus (#1290) 2026-10-27 14:03:48 -04:00
tylerjenningsw 8220d96929 Menus: tests that hover switching leaves submenus, a disabled bar and the arrow keys alone (#1290) 2026-10-27 14:03:12 -04:00
Anubhav RaiandClaude Opus 5 b86bc1d2a9 automation: Create Proxy queues an output the same way (#2479)
`file.createProxy` builds a Render Queue item exactly as `renderQueue.add`
does, with `[compName]_proxy.[fileExtension]` as its output, so an unsaved
project sent it to the home folder too.

Its `path` / `output` had to join `WRITES` for this: the confinement only
knows an output was named through that table, and it was reading them as a
read before, so a proxy could be written into a read-only root (part of the
F-11 audit in #2131).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-27 23:24:13 +05:30
Matej Kozlovský 3ad8ba9581 CLI: log warnings to stderr by default
The CLI installed no logger, so GPU warnings (a declined frame, out of
memory, fallback to the CPU) were dropped and an export silently rendered
on the CPU. Install the engine logger with a `warn` default (RUST_LOG
still overrides). Split out of #1415.
2026-10-27 18:52:16 +01:00
Anubhav RaiandClaude Opus 5 2d6e790fde automation: a confined agent can't start a script's code (#2131)
`script.run` and the Scripts menu are refused while file access is confined,
but a ScriptUI panel's script was not: `window.scriptPanel` runs it to build
the panel, `window.restoreScriptPanels` runs every remembered one,
`scriptui.click` / `set` / `mouse` / `close` dispatch events to its handlers,
and `script.runTasks` runs its `app.scheduleTask` tasks. A script reads and
writes files and reaches the network, so none of that may start while confined.

`prefs.set` is refused for the `scripting.*` settings for the same reason: the
engine already stops a script from granting itself the access the user withheld
(`Scripting::same_permissions`), and a confined agent writing it to the settings
file would hand it to every script run afterwards, long after the session.
`prefs.get` and the read-only `scriptui.list` / `scriptui.get` are untouched.

This is the "Running code" part of the F-11 audit; the other parts of #2131
are separate.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-27 23:20:40 +05:30
tylerjenningsw 13821ab694 Puppet: test editing several selected pins at once (#1751) 2026-10-27 13:44:38 -04:00
tylerjenningsw ca5e2003a7 Puppet: a value edit on one selected pin reaches the other selected pins (#1751) 2026-10-27 13:44:38 -04:00
tylerjenningsw f9fb59f29c Timeline: test Shift-selecting and deleting several Puppet pins (#1751) 2026-10-27 13:44:38 -04:00
tylerjenningsw 68e9d9e322 Animation presets: test that saved effect keyframes start at the playhead (#1971) 2026-10-27 13:44:37 -04:00
Anubhav RaiandClaude Opus 5 a2c455091f automation: a confined agent can't queue a render output outside the roots (#2479)
`renderQueue.add` and `render.preRender` without an `output` take the default
from where the project sits, which for a project that has never been saved is
the home folder — outside every `--automation-read-root` / `--automation-write-root`.
The item was queued anyway, and only `renderQueue.render` refused it, so an agent
learned about it one command too late and with a queue it had to clean up.

Both commands now look the project up first (`Lookup::DefaultOutput`) and are
refused on an unsaved project, naming `output` as the way through. A project
saved inside the roots keeps its old behaviour: the default goes beside its file
and what it writes is checked when the queue is rendered.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-27 23:14:37 +05:30
tylerjenningsw 2856803d59 Timeline: Shift-click on a group row adds it to the selection (#1751) 2026-10-27 13:44:37 -04:00
tylerjenningsw b74b89feb5 Animation presets: effect keyframes in presets saved by earlier versions start at the playhead too (#1971) 2026-10-27 13:44:36 -04:00
tylerjenningsw 337a6c2053 Animation presets: saved effect keyframes start at the playhead (#1971) 2026-10-27 13:44:36 -04:00
aiongg dd12ed8f9c Merge pull request #2518 from Silvertree2010/perf/export-speed
Export: encode while the next batch renders, skip transparent pixels when compositing
2026-10-27 13:42:31 -04:00
dotCooCoo 572ed5d17f Preserve script keyboard shortcuts across menu module changes 2026-10-27 10:25:26 -07:00
dotCooCoo 2c2c51ca0c Preserve recent script files across menu and settings module changes 2026-10-27 10:11:33 -07:00
vangel76andClaude Sonnet 5.5 36ec54f007 Merge upstream/main into warp-skip-discarded-plan
Upstream split lib.rs files into modules and moved engine commands/ to cmd/; this branch's change merges without textual conflicts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 17:51:52 +01:00
vangel76andClaude Sonnet 5.5 6418c8c0a4 Merge upstream/main into camtrack-validate-input
Upstream split lib.rs files into modules and moved engine commands/ to cmd/; this branch's change merges without textual conflicts.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 17:51:50 +01:00
Christopher Linnett c8b07b4b06 Text: duplicate during a text edit leaves no keyframe or mask vertex selected on the original (#2226)
Opening the editor keeps the keyframe and mask-vertex selection as well as the property one,
and Duplicate cleared only the properties. With the copy selected, Clear then deleted a key or
vertex of the original instead of the copy. During an edit the copies now take the selection the
way a click on them does: layer.select's rule, moved into one helper both use. With no edit
open, Duplicate's selection is unchanged.
2026-10-28 00:50:43 +08:00
dotCooCoo 385b93b9c8 Merge updated font menu fallback branch 2026-10-27 09:50:31 -07:00
dotCooCoo dac5fb46f7 Preserve readable font names in the shared font menu 2026-10-27 09:48:22 -07:00
dotCooCoo 530c7eff36 Merge updated footage interpretation and preset branches 2026-10-27 09:40:57 -07:00
NetterSilverandClaude Opus 5.5 94399e62ff Pin movie export bytes
H.264 and ProRes exports of a 60-frame comp (several render batches, a
rotating stroked ring, a fading solid at a fractional position, a
Screen-mode shape, 8 bpc) must keep the exact bytes main wrote before the
two previous commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
NetterSilverandClaude Opus 5.5 db41fa7980 Skip transparent pixels and quantise while compositing
Much of a layer buffer is often transparent (a stroked ring, a glow-padded
text layer, a precomp canvas), yet every destination pixel sampled it
bilinearly, and 8/16 bpc comps then re-quantised the layer's whole rotated
bounding box.

- Bilinear warps skip 16x16 source tiles whose pixels (and a one-pixel
  apron) all have zero alpha: their samples are transparent and were never
  drawn.
- The fast affine warp reports the rectangle it changed and, given the
  comp's levels, quantises each pixel as it blends it, so draw_comp has
  nothing left to re-quantise for that layer. quantize_px moves to
  effectcraft-raster for this.
- quantize_rect skips runs of four all-zero (+0.0) pixels, which quantise
  to themselves.
- to_rgba8 / to_rgba8_over convert row by row instead of per 4-byte item.

Every pixel stays bit-identical: tests compare the warp against the
reference path, fused quantising against quantising after blending, and
the zero-run skip against per-pixel quantising.

With the previous commit, demo comp to H.264 (`cargo xtask bench --scenario
demo --format h264 --frames 300`, 11 interleaved runs on a 16-thread Ryzen):
wall 9.26 s -> 6.97 s median (-24.8%), 8.55 s -> 6.55 s min (-23.3%); CPU
time -23%. Output byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
NetterSilverandClaude Opus 5.5 d8bca3cdd9 Overlap movie encoding with rendering
Movie exports (H.264, HEVC, AV1, ProRes, uncompressed) rendered a batch of
frames on every core, then encoded it frame by frame while the render
threads waited. Each batch now encodes on a pool shared by all exports while the
next batch renders (Cx::frames_beside). With deferred GPU readbacks, or
where no thread can be started (wasm without threads), the two still take
turns. A panicking encoder becomes an export error.

H.264 frames are converted to 4:2:0 on the render threads, per frame, instead
of on the encoder's critical path. The conversion reads 8-bit levels from a
table and rounds without a libm call; both give the same values as before
(tested against the previous formula).

Demo comp (1920x1080, 300 frames) to H.264 on a 16-thread Ryzen, export
wall time -6% (median of 7 interleaved runs); output byte-identical.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 17:40:41 +01:00
dotCooCoo e3480abf78 Upgrade saved effect parameters when applying animation presets 2026-10-27 09:40:00 -07:00
dotCooCoo 4b1c197055 Accept supported footage interpretation parameters 2026-10-27 09:35:34 -07:00
Christopher Linnett 0e3b894cd9 Text: the text-edit tests count layers with the shared helper; forwarding docs name Duplicate (#2226)
The engine's text-edit tests repeated one layer-count closure in five places; they now use
the layer_count helper the 3D tests already had. The doc of forwardable_during_text_edit and
of the Type-tool test helper still spoke of Deselect All alone, though the editor now forwards
Duplicate too.
2026-10-28 00:30:00 +08:00
Christopher Linnett eeedd6b540 Text: duplicate during a text edit leaves no effect selected on the original (#2226)
Duplicate passes over the property selection an open edit kept and copies the edited layer,
but left that selection in place on the original. With the copy selected, the next Duplicate
copied the original's effect, shape item or text animator, and Clear would have removed it.
Ending the edit through Duplicate now clears that property selection along with it.
2026-10-28 00:26:52 +08:00
dotCooCoo 6da18d16df Merge composition proxy interpretation fixes 2026-10-27 09:23:22 -07:00
Christopher Linnett 9928f6181b Text: duplicate during a text edit copies the layer, not a selected effect (#2226)
Opening the editor keeps the property selection, so Cmd+D while typing duplicated an
effect, shape item or text animator selected before and left the edit open. An open edit
now comes first, as it does for Clear: Duplicate ends it and copies the edited layer. With
no edit open, selected effects and items keep their precedence, and the command's
description says so.
2026-10-28 00:22:35 +08:00
dotCooCoo 1c6cbd8c43 Include alpha interpretation in frame-blend cache keys 2026-10-27 09:22:27 -07:00