1459 Commits

Author SHA1 Message Date
Terra854 ace3cbcda2 Timeline: move shape items between Contents groups 2026-12-02 11:47:10 +08:00
Matthew Don a11548f909 feat(engine): reload external .ecproj edits into the live session (#4170)
* feat(engine): reload external .ecproj edits into the live session

Adds a project-file watcher on a worker thread (size + mtime stamps,
250 ms debounce, 1 s focused / 5 s unfocused) that wakes the UI only when
the open project's file changed. The UI applies the change on its own thread
through the existing file.revert -> replace_project path, so CLI/MCP edits
show in the running window without a restart.

Session.project_stamp is recorded on open/save so the app's own writes do
not reload themselves. A dirty session, active script or render job holds
the change and surfaces a status instead of discarding work; autosave is
paused while a change is pending.

Closes #4168

* fix(engine): close stamp races and correct reload guidance

- record the stamp only when the saved bytes are still on disk, so a
  concurrent external write is not mistaken for our own save
- read the project and its stamp as one observation when opening, retrying
  if the file changes mid-read
- install the watcher baseline with the loaded session stamp under one lock,
  and advance it only after the debounced change is published
- add tests for self-save acknowledgement, dirty guard and autosave pause
- replace the misleading Save-before-Revert status with Save a Copy guidance

Addresses CodeRabbit review on PR #4170

* fix(engine): handle unverified saves and stale reload reports

A save whose post-write byte check fails is marked unverified so the watcher
reports the first stamp of that path as an external edit instead of adopting
it as a baseline. Before reverting, compare the on-disk stamp with the
session stamp so a completed self-save does not discard undo history. Defer
reload while a script is waiting on a file dialog. Drop a failed reload
observation so it is retried only after a new stamp, not every frame.

Addresses the second CodeRabbit review on PR #4170

* fix(engine): require known stamp for reload shortcut and cache disk stamp

The stamp-matching shortcut only applies when the session stamp is known;
an unknown stamp keeps the observation pending. The on-disk stamp is read
once when a watcher observation is taken and carried through deferral,
avoiding file I/O on every frame.

Addresses the final CodeRabbit review on PR #4170

* fix(ui): keep recovery auto-saves while an external edit is pending

Auto-save writes recovery copies to their own files, never the project
file, so pausing it while a reload was pending only removed crash
recovery for unsaved local work. Keep it running, and hold it only when
the recovery target would alias the open project file.

Adds a regression proving the external project and the local recovery
copy both survive, and corrects the spec's wrong premise.

* fix(ui): check the autosave alias only on a due write; test every reload guard

Move the project-alias check into the engine write path
(autosave_tick_guarded) so it runs on the final WritePlan only when
auto-save is enabled and a write is due; idle frames do no file-system
work. Add regressions holding a pending external change for an active
script render, an open script file dialog and an active render job.

* test: add ignored measurement benches for the #4168 budgets

frame_tick_cost_of_project_reload: per-frame A/B of the UI tick with and
without tick_project_reload (p50/p95/p99/max over 100k ticks).
watcher_idle_cpu_and_reload_memory: watcher-only idle CPU (focused and
background), write->detect latency and RSS over 100 external saves.

* fix: rustfmt and strict clippy on the project reload watcher

Rewrite the watcher's recv loop as a while condition (clippy::while_let_loop)
with unchanged behaviour: a wake or a poll timeout runs one check, a dropped
Watcher (channel disconnected) ends the thread. Collapse the pending-change
if into its let chain, keep unwrap() inside test functions only, format both
files, and normalise project_reload.rs to LF like the rest of the tree.

---------

Co-authored-by: matthewdonsemail-lab <matthewdonsemail-lab@users.noreply.github.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-12-02 00:55:37 +01:00
Tareq Halaby 69fde80f69 refactor(i18n): prepare Arabic (ar) wiring, RTL layout, and catalog gating (#4149)
* feat(i18n): add Arabic (ar) UI localization and RTL support

* fix(i18n): correct hideOthers label and avoid auto-selecting Arabic without bundled font

* fix(i18n): allow explicit requested ?lang=ar while preserving auto-selection exclusion

* refactor(i18n): separate catalog to craft-i18n and keep RTL wiring in app

* fix(i18n): gate native Arabic on catalog loading and fallback Web stored preference

- Gate native Arabic availability in Settings and language() on loading the catalog
- Keep Arabic out of the Web picker and fall back stored 'ar' preferences to English on Web
- Add tests verifying the Web preference fallback and real Arabic translation on native

* fix(i18n): remove literal Arabic Services label (AGENTS.md §16) and isolate test fixture

* test(i18n): require catalogs for all shipped languages (AGENTS.md §31)
2026-12-02 00:40:45 +01:00
Bar Borer f870db660b Text: Character and Paragraph changes reach all selected text layers (#2890)
* Text: Character and Paragraph changes reach all selected text layers (#2862)

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

* Text: `layer.setText` reaches several layers through `selected` alone (#2862)

Drops the `layers` param, its docs/agents.md note and the tests that covered
only it or the merge key. The panels' behaviour is unchanged.

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

* Text: the layer-wide stroke order leaves a locked shown layer alone (#2862)

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

* Text: `selected` with no layer to change is a no-op, and a per-character order resets them all (#2862)

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

* Text: the panels show the first unlocked selected layer, not a locked one above it (#2862)

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

* Properties: text rows change the edited layer's characters when another layer is first selected (#2862)

While a text layer was edited in the viewer and another layer was first in
the selection, the Properties text and paragraph rows dropped the edit's
range and changed the first layer's whole text instead. They now follow the
edited characters, as the Character panel does.

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

* #2862: the text eyedropper writes to the layers that armed it

A whole-layer Fill or Stroke pick sent `selected: true` when it sampled, so
it reached the selection at the click, not the layers selected when it was
armed: with A+B armed and the selection changed to A+C, C took the colour.
The pick now captures the selected text layers when armed, and the viewer
sends them as `layer.setText {layers}`, skipping any that were deleted and
cancelling when none is left. `layer.setText` takes an explicit `layers`
list: the unlocked text layers in it change, whatever is selected.

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

* #2862: the new text tests install the headless runtime like main's harnesses

Main's craft-libs runtime now refuses frames from a harness without its plugin (e34fc9ec), so the eight new Character tests build their harness with `framework::install_headless` too.

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

* #2862: layer.setText refuses an explicit target it can't honour

A `layers` value that isn't a list, or a list given with a `range`, fell through to the layer and selection path and could edit a layer the caller didn't name. Both are now an error before anything changes. Without `layers`, the named layer (or the selection with `selected`) is still the default.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:30:26 +01:00
Bar Borer b325b99f0f Puppet: a mesh that spreads a pin's pull and keeps its area (#2866) (#3066)
* Puppet: a mesh that spreads a pin's pull and keeps its area (#2866)

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

* Puppet: adding a pin and solving agree on what the pin holds (#2866)

`puppet.addPin` chose a new pin's position by whether the click was on the deformed mesh, while the solve
chooses what the pin holds by whether its rest point is on the rest mesh. On a turned mesh a click just
off the outline unmaps to a rest point on the mesh: the pin held that point, but at the click, which
pulled the mesh over (6 px at a third of a turn).

Both now use `puppet::held_point`, and a pin that holds a point goes where that point is now.

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

* Tests: the off-mesh pin test checks a pin was added (#2866)

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

* Puppet: a solve that fits a frame, shared by drawing and the overlay (#2866)

The solve was redone for the overlay after drawing, ran every refinement round however little they
moved, and built a fresh banded factor for each of up to five sets of stiffened weights, with room
for one of 320 MB.

- A round that moves no vertex 1e-4 px ends the refinement. On the far drags, the push, the cross
  and the S curve that changes no vertex by 1e-4 px, at 40 rounds or 200.
- Stiffened weights refactor into the same storage in the same order, and the factor's inner loops
  run over slices (same sums in the same order, so the same numbers).
- The factor is capped at 8 million values (64 MB). The densest mesh the tool builds (a target of
  20,000 triangles) needs 4.7 million; past the cap conjugate gradients solve the same system.
- Drawing and the overlay (`puppet.info`, adding a pin, the Puppet tools) share one cached solve.

On a 1280x720 solid with a far drag: 20,000 triangles 15.3 s to about 2.7 s, 10,000 2.2 s to about
0.8 s; with the pins at rest, 5.4 s to about 1 s.

The module doc now describes point pins.

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

* Tests: pin edge cases, the refinement mapping and smoothing (#2866)

- Mesh Rotation Refinement to rounds: the default (40), 0, negative, past the maximum, NaN and
  infinities.
- A pin on a vertex holds that vertex; one on an edge between two triangles holds the same point
  through either; one off the outline by round-off holds the point on it, and one further off its
  nearest vertex at the same offset; a Bend pin alone keeps its vertex in place.
- Smoothing falls back to the solve when the vertices don't match the mesh or no split is worth it,
  and every small triangle lies in the triangle its `parent` names.

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

* Puppet: the drawing keeps pins on their points and overlapping sheets apart (#2866)

- Smoothing bent the drawn mesh away from the points pins hold inside triangles: on the far drags
  and the S curve the image under a pin landed up to 10 px from it. The vertex gradients the
  smoothing uses now take the least change that puts each held point where the solve did (a few
  sweeps for pins sharing a vertex); edges still depend only on their two vertices, so no cracks.
- A 2x2 sample cell shared by two overlapping sheets coloured all its samples with the first
  sheet's read. A sheet whose source disagrees with the first's by more than 2 px now reads its own
  colour at its own first sample, weighted by its own samples; one sheet's cells read as before.
- The solver comparisons check both solves are the same length and finite before measuring how far
  apart they are (`f64::max` skips a NaN).

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

* Puppet: held pins stay on their points together, and a narrow sheet in a pixel keeps its colour (#2866)

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

* Puppet: the solve follows pins smoothly past what the mesh can give (#2866)

Stiffening triangles from the last solve's shape swung from pass to pass when
pins asked for more than the mesh could give, so half a pixel of drag moved
it hundreds of pixels. The stage is removed; the stress tests' limits are
set to what the solve now gives.

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

* #2866: bound the Puppet solver's pin system and keep saved rigs' look

The drawing's hold on pinned points solved one dense system over every
held pin: n x (n + 2) values and O(n^3) elimination per render, with n
uncapped. Points only meet through shared mesh vertices, so the system
now splits into groups of linked points; a group of up to 128 points is
solved exactly as before, a larger one by 32 passes of cyclic
projection, so memory and work grow linearly with the pin count.

Rigs saved before this change keep their look: a hidden Solver Version
parameter defaults to the current solve for new instances, and
migrate::legacy_default gives instances saved without it the first
solve, which renders through puppet/legacy.rs (main's solve and
drawing, bit-identical on four test rigs). The overlay and addPin's
placement follow the rig's version.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-12-01 11:27:25 +01:00
Valentin Klein c228ce284b Reversed keyframes keep the shape of manually eased curves (#4283)
* Reversed keyframes keep the shape of manually eased value curves

Time-Reverse Keyframes and Paste Reversed Keyframes swapped the ease sides
but kept the signs of numeric component speeds, which are signed value
slopes. Mirror them now, while spatial and Orientation speeds along the
path or arc and progress eases of paths stay positive.

Fixes #4273

* Paste Reversed Keyframes flips ease speeds by the property pasted into

The sign of the speeds was decided by the copied property, so Scale keys
pasted reversed into Position got negated speeds, which run a motion path
backwards. Paste Reversed now swaps the sides and keys.paste flips the
speeds for each property the keys land in: value curves flip, motion paths
and Orientation stay positive.
2026-12-01 11:25:14 +01:00
Bar Borer 9f3e8ef810 Shapes: Add Merge Paths merges what's above it and paints the result (#2889)
* Shapes: Add Merge Paths merges what's above it and paints the result (#2175)

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

* Tests: check the fix directly instead of assuming history or the tool's colour

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

* Shapes: only the Add menu's Merge Paths gets Mode Add and a paint (#2175)

Scripts keep Mode Merge and their own list: `layer.addShapeItem` does what
it did unless the menu passes `paint`, so the public `append` option goes.

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

* Shapes: Add Merge Paths' gradient runs across paths with no paint yet (#2175)

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

* Shapes: a Repeater below an added Merge Paths doesn't widen its gradient (#2175)

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

* Shapes: a Stroke among the paths doesn't widen an added Merge Paths' gradient (#2175)

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

* Shapes: Add > Merge Paths gradient ignores an open line apart from the shapes (#2175)

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

* Shapes: format the Merge Paths gradient test (#2175)

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

* #2175: saved projects keep their Merge Paths artwork

The renderer now drops every draw above a Merge Paths, as After Effects
does, so a project saved with painted groups above a Merge Paths and no
paint below it reopened blank (and exported blank).

Merge Paths gets a hidden Keep Group Paint property. New merges have it
off and render the After Effects way. A Merge Paths without it was saved
before this change: opening the project adds it on
(build::upgrade_shape_contents, next to Wiggle Paths' Spatial Phase),
and with it on, or missing, the renderer keeps the pre-#2175 rule
(drop only the paint above the merge in its own group, #1174), so saved
artwork renders as it did, with or without paint below the merge.

Tests: the #1174 pixel assertions come back as a saved-project case in
the render tests (as saved and as opened), and an engine test opens a
project file in the pre-PR shape, renders it, saves and reopens it.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 11:21:08 +01:00
NetterSilver 7e8d42c9fe Render Queue: select several items and change them together; Add to Render Queue takes every selected comp (#3953)
* render queue: multi-select items and add several comps at once (#3726)

* render queue: Delete acts on the selection keyboard navigation just moved to

* render queue: install the headless framework in the selection tests

* render queue: Delete and Edit > Clear use the final selection; null items is an error

* render queue test: require every batch output to resolve
2026-12-01 10:55:15 +01:00
FredApps 143a8357da Keep layer property targets when duplicating compositions (#4229)
* Preserve layer-valued properties when duplicating a composition

* Keep explicit no-layer values while remapping duplicate targets

---------

Co-authored-by: Fredrik Hallin <fredrik.hallin@guidelinegeo.com>
2026-11-28 10:10:16 +01:00
ViktorBystrov72 ebc1d0076b Preserve frozen Object Matte data on project import (#4126)
* Preserve frozen Object Matte data on project import

* Discard frozen mattes when import changes a nested source

* Verify frozen matte media and layer inputs on import

---------

Co-authored-by: ViktorBystrov72 <18964918+ViktorBystrov72@users.noreply.github.com>
Co-authored-by: Fredrik Hallin <fredrik.hallin@guidelinegeo.com>
2026-11-28 09:18:25 +01:00
MeanTemperature 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 Klein 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