Commit Graph
1442 Commits
Author SHA1 Message Date
MeanTemperatureandClaude Opus 5.5 61e4f00138 CLI renders keep at most 1 GB of decoded footage frames (#4157) (#4167)
* CLI: a headless session's footage frames keep at most 1 GB (#4157)

Since #3301 the footage frames may fill the caches' whole common budget,
and since #3941 the CLI's budget is that of the installed RAM. A one-pass
render reads each frame about once, so it kept gigabytes of frames it never
read again and was killed under a cgroup memory limit.

Session::footage_cap caps the footage frames (and decoded planes) below
the common budget; apply_cache_budgets honours it, so a new memory reading
or a settings change keeps it. headless_session() sets it to
HEADLESS_MEDIA_CACHE (1 GB, the footage cache's default in 0.24). The
desktop app keeps the whole budget.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(host): a headless session's footage cap is exactly HEADLESS_MEDIA_CACHE (#4157)

Assert the cap itself (or the budget, if smaller) rather than only that it
is below the budget, which a wrong cap above 1 GB would also pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-28 08:43:24 +01:00
Valentin Klein 7e7118f1a5 Overwriting a render no longer freezes the app on projects with many footage files (#3330)
* #3328: output guard checks file identity only where an alias is possible

The output guard opened every footage file of the project, for every check
of an output that existed, on the UI thread: minutes for long sequences on
a network share. It now compares only the files that can be the output
(folders on the output's volume, folders holding symbolic links), keeps the
identities it learnt in the session (folders that changed are looked at
again; Reload Footage forgets them), and does no file system call while its
lock is held.

render.frame checks and writes with one guard. A control request whose
sender stopped waiting is not run, and one tick runs control requests for at
most a tenth of a second; the rest follow in order on the next ticks.

* #3328: output guard compares paths only, no file is opened

Comparing file identities still cost a file open per footage frame when
folders were on the output's volume, and caching them invited races (#3330
review). The guard now compares paths by name once resolved: absolute, dot
segments resolved, one separator, Windows verbatim prefixes as the plain
path, without case on Windows and macOS. A link or hard link to footage
under another name is no longer recognised; the reported data loss (#1743)
is the same-path case. Render queue duplicate outputs compare by name too.

* #3328: drop the link identity tests of the render queue; test and doc review fixes

* #3328: a mapped network drive and its UNC path are one place

On Windows the output guard resolves each drive letter's root once per guard
(std::fs::canonicalize of `X:\`) and compares a path on that letter as the
place it resolves to: a mapped network drive as its \server\share path, a
subst drive as its folder. A root that can't be resolved keeps its letter.

* #3328: drive roots are looked up only where they can matter, and kept a minute

A drive letter's root is resolved only when the output and the protected
files are not all on one letter, or not all UNC paths: footage and output on
one mapped drive never wait for a disconnected drive or an empty removable
one. Resolved roots, failures too, are kept process-wide for 60 s.

* #3328: the 13,000-frame guard test counts file system lookups instead of timing them

* #3328: note why only Windows counts lookups in the 13,000-frame guard test

* #3328: queued outputs collide under drive and UNC spellings

* #3328: queued sequences and subst drives compare by the place they name

* #3328: queued outputs keep their resolved places instead of resolving per comparison

* #3328: cache_bench's play request carries the abandoned flag (main's example met the new ControlRequest field)

* Refuse an output in a folder linked to a source's folder

An output whose name matches no protected file now has its folder resolved on disk, once per folder per guard, and is compared again by name. An output in render-alias/, a symbolic link or junction to plates/, no longer replaces plates/source.exr. No protected file is looked at.

* Resolve both folders, and only for a source with the output's file name

The footage path as imported may itself run through a link (macOS /var is /private/var, Windows 8.3 names), so resolving only the output's folder missed it. Now an output whose path matches nothing is compared again only with sources of the same file name, both folders resolved once per guard. An output named like no source asks the file system nothing.
2026-11-28 08:25:14 +01:00
Anubhav-Rai ffc0ad89da Reduce Project and Remove Unused Footage keep the media an Essential Graphics override shows (#4129) (#4164) 2026-11-28 07:55:33 +01:00
FredApps 995039c7aa Merge branch 'main' into feat/import-photocraft 2026-11-26 17:17:26 +01:00
FredApps 6969ca541d Merge branch 'main' into issue-1963 2026-11-26 16:42:30 +01:00
FredApps 52b1d18833 Merge branch 'main' into camera-tools-2586 2026-11-26 16:07:34 +01:00
FredApps c1758a2667 Merge branch 'main' into export-log-phases-3713 2026-11-26 15:30:33 +01:00
FredApps ac45c3fe9e Merge branch 'main' into paste-text-style-3901 2026-11-26 15:03:43 +01:00
FredApps d56f2d058f Merge branch 'main' into fix/issue-3808-interpret-footage-target 2026-11-26 13:18:53 +01:00
FredApps 8d9aaf1055 Reconcile PhotoCraft import with current EffectCraft dependencies 2026-11-26 08:54:52 +01:00
vangel76 6dbdefa987 Export timing: audio mux writes count as writing; a finish without timing clears the last one
The movie's audio step now times mixing and encoding as audio and muxing the encoded AAC/PCM
samples (and the AAC drain) as writing, as the timing contract says. A Finished update without
timing clears the item's earlier timing. New test: an_audio_mux_write_counts_as_writing.
2026-11-25 16:36:19 +01:00
dotCooCoo 99c7e172b0 Import: show PhotoCraft composition notes as a notice, not an error
The notes about a PhotoCraft composition that was already added now go
to the window as one non-error notice. With several compositions the
notice leads with the first note and a count of the rest, and the
finished import's toast repeats the notes. Both command results keep
the warnings as before.
2026-11-24 09:12:14 -08:00
FredApps 786e9b033f Merge branch 'main' into fix/1955-producer-history 2026-11-25 00:00:45 +07:00
dotCooCoo 681b2c7468 Import: report PhotoCraft composition notes as warnings
A PhotoCraft document that imports as a composition now returns its
notes in the result's `warnings` instead of `errors`, so a successful
import no longer reports a failure. With `background`, the notes are
shown and returned when the job starts, since the composition stays in
the project when the footage job is canceled.
2026-11-24 00:29:17 -08:00
Valentin KleinandFredApps 29d116c6f7 Convert To Bezier Path works on a selected shape layer or group, for example right after drawing a rectangle (#3220)
* #3057: Convert To Bezier Path converts a selected shape layer's or group's parametric paths

Right after drawing with the Rectangle, Ellipse or Polygon tool only the layer is selected,
and Convert To Bezier Path fell through to the mask branch and reported "no masks". It only
converted when the parametric path row itself (Rectangle Path 1) was selected.

- A selected shape group converts the parametric paths inside it, nested groups included.
- With only layers selected, a shape layer converts its parametric paths, as a selected
  layer's masks are targeted. Locked layers are skipped; animated parametric paths are left
  alone and reported (skippedAnimated), and selecting the path still converts it.
- Masks win only when targeted (mask param, selected mask, mask vertices) or when one uses
  RotoBezier: plain masks no longer turn the command into a silent no-op.
- An explicit layer/layers limits selected shape items to those layers; an unmatched mask
  param is an error instead of converting every path.
- Errors say what to select instead of asking for masks.

A PSD shape layer importing as a layer with a mask matches After Effects; no change there.

Fixes #3057

* #3057: Convert To Bezier Path converts a layer named twice once

A layer given twice in `layers` (by id and by name) was widened twice: its parametric paths were queued twice, and the second replacement found no such item, so the whole command failed. The layer list is deduplicated before the widening, which also keeps skippedAnimated from counting a path twice.

* #3057: Convert To Bezier Path leaves locked layers and a group's animated paths alone

Shape items given as `items` or selected on a locked layer converted anyway (only the layer-wide conversion checked locks); they now go through unlocked(), an error when every one is locked. A selected group skips its keyframed or expression-driven parametric paths and reports them in skippedAnimated, as converting a whole layer does; a path selected itself still converts at the current time.

* Doc comments for the functions this PR touches

* #3057: Convert To Bezier Path gives an explicit mask priority over shape items

With a `mask` given, a selected parametric path (or `items`) was converted instead of the mask, an unmatched `mask` converted the shape rather than reporting the miss, and a locked shape-item layer could reject the call before the mask was looked at. Shape items are now ignored when `mask` is present.

* #3057: Convert To Bezier Path converts a selected mask with the selected shape paths

With a mask and a parametric path both selected, only the path converted and the mask kept its RotoBezier tangents. Masks the selection targets (a selected mask or its property, mask vertices, on unlocked layers in scope) now convert in the same undo step, the result reports them as masks, and they stay selected with the new paths. An explicit `mask` keeps its priority.

* #3057: Convert To Bezier Path keeps mask conversion to an explicit layer

With `{"layer": A}` and a RotoBezier mask selected on layer B, the mask branch converted B's mask and left A unchanged. The resolved masks are now scoped to the explicit layer/layers (falling back to those layers' own masks), the priority check only counts selected masks and vertices in scope, and the scoped targets are edited directly instead of being resolved again.

* #3057: Convert To Bezier Path leaves masks on locked layers alone

A scoped or selected RotoBezier mask on a locked layer was converted through the mask branch. Masks on locked layers are now dropped after the scope and its fallback are resolved, so a locked selected mask does not hand the conversion to other masks; when every targeted mask is locked, the command reports the lock, as it does for shape items.

* #3057: Convert To Bezier Path converts in the composition `comp` names

With `comp` naming a composition that is not active, an explicit `mask` was resolved there but filtered against the active composition ("no mask matches"), and explicit `items` were looked up in the active composition. convert_to_bezier now works in the composition comp_id resolves, and selected_shape_items returns the composition layer_p resolved for explicit items (also used by Group and Ungroup Shapes); a selection made in another composition does not apply.

* Convert To Bezier Path: explicit items add no selected masks

With explicit `items`, only those shape paths convert. A RotoBezier mask
selected on the same layer no longer loses its RotoBezier flag as a side
effect. Regression test added.

* Convert To Bezier Path: explicit items without a parametric path convert no mask

* Convert To Bezier Path: items count as given only as a list

---------

Co-authored-by: FredApps <153173854+FredApps@users.noreply.github.com>
2026-11-23 02:31:15 +07:00
Valentin Klein 525dcfc0d8 Browse… buttons in a script's own dialogs and panels open the file dialog instead of doing nothing (#3253)
* Scripts: a ScriptUI Browse… button opens the file dialog

Fixes #2778.
Fixes #2894.

File.openDialog, File.saveDialog, Folder.selectDialog and the instance
openDlg / saveDlg / selectDlg were stubs that returned null, so a script
dialog's or a dockable ScriptUI panel's Browse… button did nothing.

On a script-host thread, in an app that shows them, the script now asks
for the dialog (Session::script_ui.file_dialogs, each with an id), hands
the session back like a modal dialog's show() does and waits for the
answer: a File (an array with multiSelect), a Folder, or null when
cancelled. The script's filter becomes the dialog's (its name, "All Files"
for *.*); without extensions every file shows. Headless runs, the Script
Console, the web and Shutdown scripts get null at once.

The app shows the dialog after the pass's events: blocking on Windows
(Hooks::pick_file_dialog), without blocking on macOS and Linux, one at a
time; a non-blocking dialog that ends without answering counts as
cancelled. scriptui.fileDialogs lists the waiting dialogs and
scriptui.fileDialog answers one (refused while file access is confined,
and refused to scripts). A dialog leaves the list only when its script
has the answer; the script's windows refuse events meanwhile, except
scriptui.close, which cancels the file dialog first. A script host that
ends takes its dialogs with it.

* Scripts: carry a file dialog's prompt, start location and filter to the native dialog (#2778)

serve_file_dialogs collected the script's prompt, start folder and save filter
but dropped them at the host boundary. FileDialog::Script now carries prompt and
start, and new ScriptFolder and ScriptSave requests carry the folder dialog's
prompt/start and the save dialog's prompt and whole filter (label, extensions,
any file) instead of the default name's extension. Both the blocking and the
non-blocking host dialogs apply title, initial directory and filters; Save also
goes through the blocking hook where one is set. Hook-level regression test
asserts all three requests.

* Scripts: a hidden window paints so a script's file dialog is shown (#3253 review)

* Scripts: formatting (#3253)
2026-11-22 12:58:56 -06:00
NullTron 5fe33d0a9b fix(effects): sample particle producers at their birth time (#1955) 2026-11-22 02:24:47 +05:30
dotCooCoo 37ce6afb32 Merge main into feat/import-photocraft 2026-11-20 23:19:20 -08:00
Dylan M. Taylor ff1cd02409 svg: add SVG render and scene-mapping parity regression tests (#3984)
* svg: add SVG render and scene-mapping parity regression tests

* svg: fix expected CSS/inherited-opacity/pixel-center assertions in parity tests

* svg: fix inline style override and square-cap dash gap in parity tests
2026-11-20 10:53:53 -05:00
FredApps 02b9ac978b Merge pull request #1710 from MarekSpodBiedry/issue-1682
Keep Essential Graphics instance keyframes in the comp so valueAtTime and numKeys see them (#1682)
2026-11-20 21:05:34 +07:00
dotCooCoo f5bbbd2d64 Merge main into feat/import-photocraft 2026-11-19 07:28:11 -08:00
vangel76 98ada1e8ff Watch Folder renders take the host's memory budget; docs and test comment (#3941 review) 2026-11-19 10:37:00 +01:00
vangel76 0d9c69563f Exports, the Render Queue and command-line renders use the memory budget (#3941)
The command-line tool reads the system's memory once at start, so its caches
share the budget of the installed RAM instead of the budget for unknown RAM.
A Render Queue run's two layer caches and a one-off export's own caches take
the session's layer cache budget instead of a fixed 512 MiB; they are in the
memory accountant, which keeps them within the common budget together with the
other caches. In the browser each gets half the layer cache's cap.
2026-11-19 10:29:54 +01:00
vangel76 6bea5fa6ae Merge upstream/main into cache-defaults-3298 2026-11-19 10:21:55 +01:00
vangel76 6619dbe1d4 #3901: the Paste Reversed check counts the keys and checks the reversed key's time and value 2026-11-18 17:40:33 +01:00
vangel76 5d27d1377c #3901: pasted Source Text keyframes keep their style
Pasting a copied Source Text keyframe (keys.paste, Paste Reversed) or a
copied unanimated Source Text value (Edit > Copy / Paste) went through the
value's JSON form, which is the characters only, so the pasted key took the
font, size and colours of the property's current value. A copied text value
now pastes as the whole document; every other kind is pasted as before.
2026-11-18 16:21:47 +01:00
FredApps e2b17586c0 Merge main into feat/import-photocraft 2026-11-18 20:20:08 +07:00
vangel76 3641cb38a8 Merge remote-tracking branch 'upstream/main' into export-log-phases-3713
# Conflicts:
#	crates/export/src/lib.rs
#	crates/export/src/webm.rs
#	crates/export/src/webm_av1.rs
2026-11-18 12:54:29 +01:00
dotCooCoo 8e1defea93 Import: test the PhotoCraft input limit without reading 512 MiB
The two tests of the 512 MiB limit read a sparse file one byte over it
into memory to show that other ZIP-based files are read whole. They now
check the limit from the file's length alone and read a 4-byte file: the
engine test reads it with and without a smaller limit, and the media
reader's limit comes from input_limit, which gives the limit for .pcraft
files only.
2026-11-17 19:20:23 -08:00
dotCooCoo b84130ad63 Import: refuse pass-through groups deeper than the renderer collapses them
A pass-through group becomes a precomposition with Collapse Transformations on, and the renderer collapses one only 12 comps deep. A deeper one was flattened, so its layers no longer blended with the layers below the group. Composition import now refuses pass-through groups more than 13 levels deep and suggests Footage, as it does for groups more than 16 levels deep. The renderer's limit is effectcraft_render::MAX_COLLAPSE_DEPTH.
2026-11-17 18:25:04 -08:00
dotCooCoo 8e648b3e6f Import: one PhotoCraft input limit for the engine and media readers
The 512 MiB limit is effectcraft_project::PCRAFT_MAX_INPUT. The engine
re-exports it and the media reader's limit is defined from it, so the two
reads cannot drift apart. Both reads compute their take() limit with
saturating_add.
2026-11-17 18:07:13 -08:00
Christopher Linnett 337a6ba677 #3808: Interpret Footage keeps main's results for targets that aren't footage
`file.interpretFootage` resolves its items as before and skips what isn't
footage, so an explicit missing id, composition or solid succeeds and
changes nothing again, and a script setting a solid's
mainSource.conformFrameRate doesn't throw. The dialog still opens on the
first item `interpretation_targets` gives, which is the first footage the
command changes, and opens no dialog when that is none.

Tests pin Main's result for those targets, Proxy's existing error, and
the script setter on a solid.
2026-11-18 00:07:03 +08:00
arnav-hiwarkar c07dbf32ca Merge remote-tracking branch 'upstream/main' into fix/3464-drop-shadow-softness-range 2026-11-17 20:54:02 +05:30
Christopher Linnett 5af43b67b5 #3808: Interpret Footage: the dialog shows the footage the command will change
Opened with `item`/`items` (an agent's `ui.menu.invoke`), the Interpret
Footage dialog filled its fields from the Project selection while OK ran
the command on the named item, so that item took another footage's
interpretation. The dialog and the commands now share one target
resolution, `commands::interpretation_targets`: `items`, else `item`,
else the selection, keeping footage (for Proxy, items with a proxy). The
dialog shows its first item.

A named item that is missing, not footage or (Proxy) without a proxy
opens no dialog: the command runs and reports that there is nothing to
interpret, as Proxy already did. Interpret Footage used to accept such
ids and change nothing. Use Proxy and the proxy commands' enablement
share the "has a proxy" filter.
2026-11-17 22:36:17 +08:00
arnav-hiwarkar eb14583749 Merge remote-tracking branch 'upstream/main' into fix/3467-radial-blur-amount-range
# Conflicts:
#	crates/aep/src/export/fx_defs.rs
#	crates/engine/src/tests/effect_ranges.rs
#	docs/effects-parity.md
2026-11-17 18:34:15 +05:30
arnav-hiwarkar 7f14df8355 Merge upstream main into fix/3460-gaussian-blur-range
Keeps the Gaussian Blur (#3460) and Sharpen (#3466) tests in
crates/effects/src/misc.rs; Sharpen's code is as main has it.
2026-11-17 18:08:30 +05:30
ash a188867a42 Merge pull request #3810 from arnav-hiwarkar/fix/3466-sharpen-amount-range
Sharpen: Amount takes After Effects' 0..4000 range (#3466)
2026-11-17 18:06:39 +05:30
arnav-hiwarkar ff9584fa64 Merge remote-tracking branch 'upstream/main' into fix/3467-radial-blur-amount-range
# Conflicts:
#	crates/engine/src/tests/effect_ranges.rs
#	docs/effects-parity.md
2026-11-17 17:57:33 +05:30
arnav-hiwarkar 69666e68c7 Merge upstream main into fix/3460-gaussian-blur-range
Keeps the Gaussian Blur (#3460) and Turbulent Displace (#3469) rows in
the engine range test and the effects parity log.
2026-11-17 17:57:21 +05:30
arnav-hiwarkar 95685d8d41 Merge remote-tracking branch 'upstream/main' into fix/3469-turbulent-displace-amount-range
# Conflicts:
#	docs/effects-parity.md
2026-11-17 17:26:50 +05:30
arnav-hiwarkar 83285272e3 Merge upstream main into fix/3460-gaussian-blur-range
Keeps the Gaussian Blur (#3460), Fractal Noise (#3486) and CC Power Pin
(#3492) rows in the effects parity log.
2026-11-17 17:25:22 +05:30
arnav-hiwarkar ffdcdb507d Merge remote-tracking branch 'upstream/main' into fix/3464-drop-shadow-softness-range 2026-11-17 17:25:13 +05:30
arnav-hiwarkar cebe224d85 Merge remote-tracking branch 'upstream/main' into fix/3467-radial-blur-amount-range
# Conflicts:
#	docs/effects-parity.md
2026-11-17 17:24:34 +05:30
arnav-hiwarkar 5adc96bfbf Merge remote-tracking branch 'upstream/main' into fix/3466-sharpen-amount-range
# Conflicts:
#	crates/engine/src/tests/effect_ranges.rs
2026-11-17 17:24:31 +05:30
arnav-hiwarkar 9bb0db0207 Merge upstream main into fix/3460-gaussian-blur-range
Keeps both the Gaussian Blur (#3460) and CC Power Pin (#3492) rows in
the engine range test and the effects parity log.
2026-11-17 16:55:18 +05:30
arnav-hiwarkar 969286ae76 #3460: review: name the open follow-up for SLIDERS_0_24, use the shared pixel budget in the test
The table holds only Gaussian Blur's row; the ranges changed since 0.24.1
by other work are tracked in #3815. The 30000 render test checks the
buffer against crate::pixel_budget instead of a copied constant.
2026-11-17 16:52:08 +05:30
arnav-hiwarkar 8fe42b29c6 Merge remote-tracking branch 'upstream/main' into fix/3464-drop-shadow-softness-range 2026-11-17 16:49:21 +05:30
arnav-hiwarkar 79d4be499d Merge remote-tracking branch 'upstream/main' into fix/3466-sharpen-amount-range
# Conflicts:
#	crates/engine/src/tests/effect_ranges.rs
#	docs/effects-parity.md
2026-11-17 16:48:30 +05:30
arnav-hiwarkar 63ec0033d1 #3486: merge main (CC Power Pin range rows in the shared tables) 2026-11-17 16:48:19 +05:30
arnav-hiwarkar a3ab20e9f7 Merge remote-tracking branch 'upstream/main' into fix/3469-turbulent-displace-amount-range
# Conflicts:
#	crates/engine/src/tests/effect_ranges.rs
#	docs/effects-parity.md
2026-11-17 16:46:35 +05:30