Commit Graph
3605 Commits
Author SHA1 Message Date
Marco Arnulfo 58037b8657 Lottie: size an imported precomp from its precomp layer's w/h when the asset has none 2026-10-24 17:46:26 +02:00
dotCooCoo ce0ae4e387 Fix #341: answered file dialogs run before the close decision
The close decision moved to App::logic, which runs before App::ui, while
the queued file-dialog answers still ran in ui. An answer that arrived in
the frame that closed the window changed the project after the decision,
so the window could close without asking to save. The answers now run in
logic, before the decision.
2026-10-24 08:38:14 -07:00
dotCooCoo 9de2c5ee8a Interpret Footage: Cineon Settings convert DPX and Cineon log scans
DPX and Cineon footage showed its log code values as stored, with no
way to convert them. Interpret Footage now has the Cineon Settings that
After Effects' help page describes: Logarithmic Conversion, the
Converted Black and White Points, the 10 Bit Black and White Points,
Current Gamma, Highlight Rolloff and Units. With Logarithmic
Conversion on, the code values of each decoded frame are converted
from printing density to the Current Gamma between the converted
points, before Separate Fields, Frame Blending, Interpret As Linear
Light and the working space use them. With it off (the default), the
values stay as stored.

file.interpretFootage and file.interpretProxy take the settings as
parameters and report them. They return an error for out-of-range
values, and for Cineon parameters when none of the items is a DPX or
Cineon file. Apply Interpretation copies the settings between DPX and
Cineon files.
2026-10-24 08:37:15 -07:00
Marco Arnulfo f17ff8bff5 Lottie: import every Dash/Gap pair of a stroke, not only the first dash and the last gap 2026-10-24 17:37:03 +02:00
onlykshitijandClaude Opus 5.5 6e7cc34c9e Scripts: window.scriptPanel opens only ScriptUI panels
It fell back to any script, so a script outside the ScriptUI Panels folder opened as a panel and
was remembered, then reported missing and forgotten at the next launch (restore looks only for
panels). Review feedback from CodeRabbit on #2289.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:45:29 +05:30
dotCooCoo c2011fb11d Scripts: Recent Script Files keeps a script's full path, and same-named entries show their paths
A script run from a relative path is stored with its absolute path, so
choosing it again runs the same file after the working directory changes.
The web build keeps its file keys as they are (Services::full_path).

Two recent scripts, projects, footage files or presets with the same file
name are listed with their paths instead of the name alone.
2026-10-24 08:03:16 -07:00
onlykshitijandClaude Opus 5.5 de88e084e6 Scripts: doc comments for the functions this change touches
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 20:32:47 +05:30
onlykshitijandClaude Opus 5.5 c7dda713d9 Scripts: uninstall never deletes through a subfolder
A subfolder of a Scripts folder can be a link to another folder (an extension's own checkout).
`file.uninstallScript {"name": "Motion Kit/Animate.jsx"}` then deleted Animate.jsx in that
folder, outside the settings folder. Uninstall now refuses `Folder/File.jsx` names and removes
only scripts at the top of the Scripts folders, where Install puts them; listing and running
through a linked folder still work.

Regression test: uninstall_never_deletes_through_a_linked_subfolder (failed before the fix).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:46:37 +05:30
dotCooCoo eb2a4820e8 Scripts: Recent Script Files lists the last ten scripts and Cmd+Alt+Shift+D reruns the newest
File ▸ Scripts gets a Recent Script Files submenu with the ten scripts run
last, newest first: script files run with Run Script File… or a command, and
the installed and bundled scripts of File ▸ Scripts. ScriptUI panels are not
listed. The list is kept in the settings. Each entry runs its script again
through `file.runScript {"recent": i}`, and Cmd+Alt+Shift+D runs the most
recent one; the key can be changed in Edit ▸ Keyboard Shortcuts. An entry
records whether it ran a file or an installed script, so a file named like a
bundled script runs again as that file.
2026-10-24 06:08:26 -07:00
NetterSilverandClaude Haiku 5.5 dbe92141d2 Bound SVG arc segment count for huge radii
Fixes #2128

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 14:43:44 +02:00
NetterSilverandClaude Haiku 5.5 1c9041478c Keep FrameRate::from_f64 nonzero for tiny positive fps
Found while testing crates/time/src/lib.rs:201

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 12:43:37 +00:00
onlykshitijandClaude Opus 5.5 bdcd2dc051 Scripts: subfolders of the Scripts and ScriptUI Panels folders become submenus
An extension that ships several panels no longer adds one Window menu entry per panel:
`Scripts/ScriptUI Panels/Motion Kit/Animate.jsx` shows as Window > Motion Kit > Animate.jsx,
and a subfolder of `Scripts/` is a submenu of File > Scripts. Top-level scripts are unchanged.

- Script names may be `Folder/File.jsx`: exactly one folder, each part a bare name (no `..`,
  `\`, NUL or empty part), never `ScriptUI Panels/...` under `Scripts/`.
- window.scriptPanel, file.runScript, file.uninstallScript, file.scripts.list and
  scriptui_panels.json take such names; a panel's tab is titled after its file.
- ConfigStore::list_dirs (DirConfig, MemoryConfig) lists the subfolders.
- menus::dynamic_nodes groups a folder's entries into a MenuNode::Submenu; the egui and native
  menus draw it with their submenu code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 18:05:59 +05:30
dotCooCoo decc8b72f9 Advanced 3D: shadow jitter blends across its lattice cell, so GPU penumbrae match the CPU
The PCF tap jitter was keyed on the receiver's 1/8-texel cell in the
shadow map. The GPU computes the receiver's map position with last-bit
differences from the CPU, so a receiver next to a cell line could take
another cell's jitter on one backend, and every tap moved. In a wide
penumbra that changed the coverage by several 8-bit levels:
gpu_matches_cpu_wide_penumbrae failed on Windows with 15 of 4159
shadowed pixels on an NVIDIA RTX 5080 and 22 on an AMD Radeon iGPU,
against a budget of 8.

tap_jitter now blends the hashes at the four corners of the cell by
the receiver's position in it, in shade.rs and in advanced3d.wgsl. At
the lattice points the jitter is the per-cell hash it was before. A
CPU test checks that the coverage does not jump at a lattice line.
2026-10-24 04:25:03 -07:00
onlykshitijandClaude Opus 5.5 9514c127cb ScriptUI: test that paint_draw paints fill, stroke and text colours as sRGB
The first test only called draw_color. This one runs paint_draw on an egui
context and checks the colour of each painted shape, so a branch that skips
draw_color fails the test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 15:33:34 +05:30
dotCooCoo eff747897d Fix #341: the close decision runs in App::logic
eframe runs App::logic without App::ui while the window is minimized or
hidden, and handles a close request then too. The unsaved-changes check, the
device-loss close and craft_quit::on_close_request ran from ui, so such a
close skipped the prompt and the macOS quit through terminate:. They now run
at the end of logic, with the platform hook last, as craft-quit asks.
2026-10-24 02:50:22 -07:00
dotCooCoo efe7581f93 Scripts: the Startup and Shutdown folders run at launch and quit
Scripts in Scripts/Startup and Scripts/Shutdown in the settings folder
were never run. The desktop and web apps now run the Startup scripts at
launch, before a project opens, and the desktop app runs the Shutdown
scripts as it quits, after the project is closed. Each folder runs in
alphabetical order with case ignored, and files larger than 16 MiB are
not run. A Startup script that fails is reported in a toast and in the
log, a Shutdown script that fails is reported in the log, and the next
one still runs.

A Startup script that waits in a modal dialog goes on when the dialog
closes, while the next scripts run. A Shutdown script's dialogs close
as if canceled. With the settings folder on disk, each script runs as
its file, so #include, $.fileName and $.evalFile resolve against the
script's own folder.

The new commands file.runStartupScripts and file.runShutdownScripts
return the scripts that ran, those still waiting in a dialog, and those
that failed. Like script.run, both are refused in confined automation
sessions, in batches and in script steps, which now read one list of
script commands (RUNS_SCRIPTS). The list also holds window.scriptPanel
and window.restoreScriptPanels, which run ScriptUI panel scripts and
were not refused on main either. The apps still call
window.restoreScriptPanels at launch. plugins.md, scripting-parity.md,
gaps.md, target-app-parity.md and agents.md describe the folders. Each script
still runs in its own global scope, so a Startup script's variables are
not available to later scripts.
2026-10-24 02:44:05 -07:00
Dylan M. TaylorandClaude Sonnet 5.5 c07604563e sonar: leave the duplicated cache blocks in object_matte and roto alone (new-code duplication gate)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 08:45:39 +00:00
Dylan M. TaylorandClaude Sonnet 5.5 4e9fa51f12 sonar: method paths instead of closures (rust:S1612)
Poison recovery, OsStr::to_str and char predicates only; S4325 casts are
f64 to f32 and stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 08:17:16 +00:00
onlykshitijandClaude Opus 5.5 47f55abb87 ScriptUI: fix script-drawn colours showing too bright
paint_draw passed a script's 0 to 1 colour values to egui::Rgba, which
stores linear light. egui then applied the sRGB curve, so every
fillPath, strokePath and drawString colour drew too bright. For example,
#2B2B2B drew as RGB 114 and #F28C28 as 249, 196, 110.

After Effects treats these values as plain screen colours. Convert them
with the existing to_color32 helper instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 13:09:51 +05:30
dotCooCoo aa296cf273 Merge branch 'main' into fix/macos-quit-crash 2026-10-23 23:01:09 -07:00
Jason LukerandClaude Fable 5.1 cb46d69e44 Window: start the wgpu surface from eframe's default, one frame in flight instead of two
`wgpu_options` built the window's configuration from `WgpuConfiguration::default()`, whose surface is
`SurfaceConfig::HIGH_THROUGHPUT` (two frames in flight); eframe's own `NativeOptions::default()` wraps
it with `LOW_LATENCY` (one), and replacing `wgpu_options` wholesale silently lost that. On Metal,
wgpu-hal sets `maximumDrawableCount = latency + 1`: three drawables instead of two, one more frame
between the pointer and the screen on every drag, scrub and slider (8 ms at 120 Hz, 17 ms at 60 Hz).

Start from `.with_surface_config(eframe::SurfaceConfig::LOW_LATENCY)`; everything else in
`wgpu_options` is unchanged.

Measured on an M2 Max (release, `footprint -p`): IOSurface 61 MB → 41 MB (three 21 MB drawables →
two). Interface frame rate during 10 s of playback of a 1080p comp whose frames cost 164–279 ms on
the GPU stays at 120 fps either way (median 120.1 vs 120.0, p10 116–119.5 vs 117–119.4), so one
frame in flight does not starve this comp at 120 Hz.

Test: `the_window_surface_is_low_latency` asserts `LOW_LATENCY`, `desired_maximum_frame_latency ==
Some(1)` and `AutoVsync` for every backend choice, and equality with eframe's default surface.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-23 21:50:06 -07:00
Christopher Linnett 34242e8c1b fix: move Buf offsets by the pad Image::padded actually applies (#2092 review follow-up)
Image::padded clamps the pad so each side stays within MAX_PADDED_SIDE, but
Buf::pad still added the requested pad to its offset, so a clamped pad left
the pixels and the offset disagreeing (a hostile pad of u32::MAX shifted the
pixels by 5 and the offset by ~4.3e9). The clamp now lives in one place,
Image::effective_pad, used by both padded() and Buf::pad.

The padded() doc now states what the clamp guarantees (output within the
largest image the engine supports) and that memory budgets belong to callers
that pad by a derived amount (DOF_PAD_BUDGET, GPU fits()).

Adds an effects regression test: Buf::pad(u32::MAX) moves the offset by the
clamped pad and the source pixel stays at its layer position (fail-before:
offset off by u32::MAX). cargo test -p effectcraft-effects 457/457,
-p effectcraft-raster 35/35, -p effectcraft-render 238/238; clippy -D
warnings and fmt clean on touched crates.
2026-10-24 11:49:53 +08:00
aiongg eb5108786b PDF: repin craft-pdf, hayro-syntax and hayro-jbig2 to craft-libs 9f75d3dc for its xref, object-stream, graphics-state and JBIG2 input bounds (#2265) 2026-10-23 23:27:29 -04:00
Christopher Linnett d3d23c2f74 fix: bound Image::padded() at the API so no caller can reintroduce the oversized-pad OOM (#2092 review follow-up)
Triage found the pad bound lived only in the DoF callers: Image::padded was
pub with a doc comment asking callers to bound pad, so a future caller could
reintroduce the exact oversized-buffer OOM this PR fixes. The cap now lives
inside padded(): pad is clamped so each output side stays <= MAX_PADDED_SIDE
(30 000, mirroring project limits::MAX_SIZE; raster cannot depend on the
project crate per layering), overflow unreachable by construction, no panic in
any profile. The caller-side padded_size guards stay for reject-on-error UX.

Adds raster regression tests: hostile pad (u32::MAX) clamps to cap with source
intact at the clamped offset (fail-before: pre-fix sized an oversized buffer);
legit pads byte-identical (anti-over-clamp). cargo test -p effectcraft-raster
35/35, -p effectcraft-render 238/238, clippy -D warnings clean, fmt clean.
2026-10-24 11:26:30 +08:00
aiongg 1400cf7c78 Merge pull request #2264 from aiongg/contrib-batch-4
Integration batch 4: 15 contributor PRs (interface, scripting, hardening, docs)
2026-10-23 22:57:03 -04:00
aiongg e3e9776c25 Batch fix: settings: size the page column from the titles it draws (#2171) 2026-10-24 02:12:59 +00:00
aiongg 07eda94115 Merge #2033: docs: escape the backtick in the twirlSelected shortcut (#2025) (@gmrmad1) 2026-10-24 02:12:25 +00:00
aiongg 2281e3ffec Merge #1761: Timeline: a shape group's inner Contents draws no row, as After Effects elides it (@elZanco)
# Conflicts:
#	docs/ui-parity.md
2026-10-24 02:12:25 +00:00
aiongg 9a9574baaa Merge #2016: Settings: list the languages alphabetically by their own name (@nikolainyegaard) 2026-10-24 02:12:11 +00:00
aiongg cf54196ad9 Merge #2171: Settings: fit translated page names in the sidebar (#2034) (@Maokus) 2026-10-24 02:11:49 +00:00
aiongg 39526acc86 Merge #1327: Timeline: focus newly added expressions after Alt-click (refs #1072) (@tylerjenningsw) 2026-10-24 02:10:16 +00:00
aiongg 0db7ddb089 Merge #2228: End an open text edit when Deselect All runs (#2096) (@ChristopherLinnett) 2026-10-24 02:10:16 +00:00
aiongg 1d61fc6979 Merge #1933: Viewer: keep hidden AV layers' controls visible (#1769) (@ki2pixel)
# Conflicts:
#	docs/ui-parity.md
2026-10-24 02:10:16 +00:00
aiongg 2b8bb3150e Merge #2156: Return None from Mat4::inverse for non-finite input (@Silvertree2010) 2026-10-24 02:10:03 +00:00
aiongg 9384ab7a47 Merge #1945: Reject non-hex characters such as '+' in Rgba::from_hex (@Silvertree2010)
# Conflicts:
#	crates/color/src/lib.rs
2026-10-24 02:10:03 +00:00
aiongg 0494226fc8 Merge #1997: Keep rgb_to_hsv and rgb_to_hsl hue within 0..1 (@Silvertree2010) 2026-10-24 02:09:49 +00:00
aiongg 1ea2c0416f Merge #1881: Reject non-finite numbers in CSS colour parsing (@Silvertree2010) 2026-10-24 02:09:49 +00:00
aiongg c00170bcc6 Merge #1867: Fix scheduled ScriptUI tasks in host sessions (@dorfee) 2026-10-24 02:09:49 +00:00
aiongg 63f4bacf83 Merge #1891: fix(script): interrupt blocked socket writes on close (@TimotheusG) 2026-10-24 02:09:49 +00:00
aiongg aa65e498ce Merge #1948: CLI: preserve template composition names when rendering (@tylerjenningsw) 2026-10-24 02:09:49 +00:00
aiongg 113b92ac8c Merge #2110: ui: scrub hot text from the slider range (#2097) (@gmrmad1) 2026-10-24 02:09:49 +00:00
aiongg b898ba7f03 Merge pull request #2260 from aiongg/contrib-batch-3
Integration batch 3: 19 contributor PRs (interface, engine, effects, GPU, PDF and EPS import)
2026-10-23 22:08:01 -04:00
aiongg 2cca29830e Batch fix: EPS: load returns an operator value, so an executable-name alias runs what its name is bound to (#1909) 2026-10-24 01:43:40 +00:00
aiongg a407281852 Batch fix: tests: the web-job GPU page blurs by 12, which the GPU still runs after #1968 (#1968) 2026-10-24 01:39:09 +00:00
aiongg 80a08e3a3f Batch fix: pdf: the u32 overflow tests reach their fonts from the page, as the object loader needs (#2163) 2026-10-24 01:29:13 +00:00
aiongg c028b49f99 Batch fix: EPS: executable names count against the PostScript call depth 2026-10-24 01:23:26 +00:00
aiongg 69d6e3d28a Batch fix: EPS: filter keeps its source, so an image's data source isn't skipped twice (#1909) 2026-10-24 01:22:55 +00:00
aiongg fec95ff7ea Merge #1909: EPS: Illustrator EPS files draw their artwork (#955) (@JWesCampbell) 2026-10-24 01:21:39 +00:00
aiongg f50019244a Merge #2163: Fix u32 overflows in PDF CID width tables and CMap ranges (#2147) (@MarekSpodBiedry) 2026-10-24 01:21:39 +00:00
aiongg a6d8d23dfc Merge #2045: GPU: devices favour memory use, so Purge and Close give video memory back (@arnav-hiwarkar) 2026-10-24 01:21:39 +00:00