* #4368: Add / Match / Remove Grain gain After Effects' missing controls
Shared grain groups (crates/effects/src/grain_shared.rs), all functional:
- Application > Channel Balance (9 per-channel shadow/midtone/highlight multipliers)
- Sampling > Source Frame, Noise Sample Points 1-10 (used by Sampling Process "Manual"),
Match Grain's per-point Intensity 1-10
- Blend with Original: Amount, Combine Match and Mask Using, Blur Matte, Color Matching
(RGB / Hue / Chroma, tolerance, softness, invert) and Masking Layer (layer, mode, size fit)
Remove Grain: Channel Noise Reduction (R/G/B), Chroma Suppression, Noise Size Bias,
Clean Solid Areas.
New instances follow After Effects' Effect Controls order; saved instances keep their
stored order and get the new controls with defaults that render unchanged (Source Frame
-1 = the frame being rendered for projects saved before it).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: grain sampling review fixes
- Manual Noise Sample Points skip boxes whose surround reaches transparent pixels (the
automatic rule), and each kept box keeps its own point's Intensity.
- Remove Grain measures a fixed Source Frame that is the current frame before Temporal
Filtering, as other frames are measured; Source Frame -1 keeps the old measurement.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: Match Grain's historical Masks choice no longer samples the unmasked Source
Historical mask reads aren't available, so layer_sample_frame returns None for
the Masks choice and the caller falls back to the current-frame layer_masks
read. Source and Effects & Masks historical reads are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: Masks at a historical Source Frame; legacy Roto Brush keys with grain above
Match Grain's Masks choice at a historical Source Frame now samples the
layer with its masks as they are at that frame: EffectHost gains
layer_masks_at (default None, the current-frame fallback), and the
renderer's FxHost implements it like layer_masks at another time.
Roto Brush Input Keys saved by 0.24 hash the effects above the brush.
Opening an old project adds the grain effects' 89 new controls and
Manual to Sampling Process, so the legacy text now leaves the added
controls out while they hold the value an old project gets (Source
Frame -1 via legacy_default) and restores Sampling Process's 0.24
options. The ADDED_SINCE_0_24 mechanism is taken as-is from #4374
(with an Added::Legacy variant and a POPUPS_0_24 table added).
Tests: grain_shared historical Masks test, render
layer_masks_at_reads_the_masks_of_that_time, legacy.rs unit tests and
an analysis_signature test on an old project with grain above a frozen
brush (fixture grain-0.24.json written by the pre-#4368 code). That
last test is #[ignore]d: its 0.24 key derivation did not reproduce the
base fixture's key in a local run.
Not compiled locally after the final edits; CI is the check.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: un-ignore the grain legacy Roto Brush key test
The test reproduced 0.24's Roto Brush Input Key from the fixture as opened, but the fixture's
3D Camera Tracker (above the brush) holds a stand-in Solve that 0.24 didn't have when it made
the key: the first edit clears it (camera_track::invalidate), and only then does the legacy text
give ROTO_INPUT_0_24. The derivation now adds a render queue item first, as the fixture's own
test does, and the test runs again.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* Keep the layer in place when centering an anchor on an animated layer
Center Anchor Point in Layer Content (also Ctrl/Cmd+double-click on the
Pan Behind tool) shifted every Position key by one offset worked out at
the current time. With keyed Anchor Point, Scale, Rotation or (3D)
Orientation that offset is wrong at other frames, so the layer jumped.
The anchor now moves by one layer-space delta at every time: a keyed
Anchor Point has every key moved by it. Position moves by that delta
through the layer's own transform at each time, in its parent's space,
including the source pixel aspect and the Z component of 3D layers.
When Scale and Rotation (and X/Y Rotation and Orientation on 3D layers)
are not keyed, every Position key moves by the same shift as before.
Otherwise Position, combined or separated, is keyed on every comp frame
across the span of those keys and its own. Everything is one undo step.
Refs #3835
* Thin the Position keys Center Anchor Point adds and refuse driven layers
When the Position shift changes over time, Center Anchor Point keyed
Position on every frame of the span. It now drops a frame key when the
straight run between its neighbours (or the held value after a Hold key)
passes within 0.01 px of it and of every frame dropped before it. Every
original Position key, every transform key time and the frames next to
each original Position key stay, so the original key's ease and spatial
handles only shape one-frame segments. Original keys switch to automatic
spatial handles, since manual ones drawn for their old neighbours would
overshoot; keys added after a Hold key hold too.
The shift for a key time is now read at the comp tick that maps back to
that exact layer time, so a Hold key is not read a tick early under a
fractional stretch.
Layers whose Scale, Rotation or Orientation has an expression, or that
auto-orient along their path, are skipped, and the command is an error
when none is left: the shift follows keys only. The Quick Set Anchor
comment now gives its restriction as a choice of scope.
Refs #3835
* Fix a Clippy auto-deref warning in the Center Anchor Point key check
* Center Anchor Point skips layers with a Position or Anchor Point expression and camera-facing 3D layers
---------
Co-authored-by: FredApps <[email protected]>
* Layers: ordered selection for copy, paste and sequencing
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Layers: Shift ranges and marquees select in stack order
Selection order now only follows Ctrl/Cmd-clicks. A Shift-click range and
a layer marquee list their layers top first, whichever way they were made,
as Adobe documents for marquee selections (Quick Offset, #1012) and as the
Quick Offset and timeline selection tests expect.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Layers: keyboard-extended selections stay in stack order
Extend Selection to Next / Previous Layer prepended each new layer, so
selecting L2 and extending down twice gave [L4, L3, L2] and Copy / Paste
reversed the range. Extending is a range gesture like Shift-click: it now
grows the end it steps from (the lowest selected layer going down, the
topmost going up) and puts the new layer next to it, so a range grown from
one layer stays top first. Ctrl/Cmd-click order elsewhere is kept.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* Puppet: press-drag with a pin tool places the pin and drags it
With a Puppet pin tool, a press on the layer's art followed by a drag did
nothing: a pin took a click to place and a second press to move. As in
After Effects, the pin now goes down where the button does and follows the
pointer while it is held. Position and Advanced pins carry the mesh to the
release point, Starch and Overlap pins are placed where the drag ends, and a
Bend pin (no position) stays where it was placed. puppet.addPin takes a
`merge` key so the add and the following puppet.movePin steps are one undo
step. A plain click still just adds a pin.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Puppet: store a drag-placed Starch/Overlap pin's rest like a click
puppet.movePin wrote the raw (deformed-space) point into a Starch or
Overlap pin's rest, while puppet.addPin maps a click back to the rest
mesh. On a deformed mesh a press-drag and a click at the same point
stored different rests. movePin now maps the point through the mesh's
current deformation without the pin itself (puppet::overlay_without),
as addPin does before the pin exists, so a drag, a click and a later
drag of an existing pin all rest under the pointer. Position, Advanced
and Bend pins are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Puppet: decide the pin kind before evaluating a drag's rest mapping
Position, Advanced and Bend pin drags no longer evaluate the deformation just to discard it; only Starch and Overlap pins map through the rest mesh.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Puppet: place a dragged Starch/Overlap pin on the mesh under the release, solve only its mesh
A press-drag that places a Starch or Overlap pin now ends with `puppet.movePin` `place: true`,
which moves the pin into the mesh a click at the release point would choose (the first mesh the
point is on or beside, deformed without the pin), in the gesture's undo step. It used to stay in
the pressed mesh's Deform group, acting on nothing under it.
While dragging, the rest point is mapped through the pin's own mesh only
(`puppet::overlay_of_pin`), not every mesh of the layer, so each pointer move builds and solves
one mesh.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Puppet: a dragged Starch/Overlap pin released on unmeshed art meshes it, as a click does
`puppet.movePin` with `place` now does what a click at the release point does when that point
is on no mesh: on art no mesh covers, it adds a mesh there (with the current mesh options) and
moves the pin onto it, resting at the release point, in the drag's undo step. Where a click
would place nothing (the art is already a mesh's own), the pin keeps its mesh.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Puppet: a Starch/Overlap drag released off the art places it only where a click would
The end of a drag that placed a Starch or Overlap pin now asks the same question a click does
(`puppet_click_layer`, shared by press, click and release): only when a click at the release
point would put a pin on this layer does `puppet.movePin` get `place`. A release on empty canvas
used to mesh the unmeshed art nearest the pointer, which a click there never does; the pin now
stays on its mesh.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Puppet: a Starch/Overlap drag that leaves the mesh its press made removes that mesh
The first Starch or Overlap press on unmeshed art makes a mesh for the new pin.
When the release puts the pin on another mesh (or a new one on another piece),
the press-made mesh was left behind empty: Show Mesh outlined it and the
renderer kept rasterizing it. `puppet.addPin` now reports `newMesh`; the viewer
keeps that mesh in the gesture and passes it to the release's `puppet.movePin`
as `madeMesh`, which removes it in the same edit when the pin was its only pin
and the placement is elsewhere. Meshes that existed before the gesture,
including empty ones, are never removed. Undo stays one step.
Test: puppet_starch_drag_off_unmeshed_art_leaves_no_mesh_behind (two islands:
release piece meshed; no Puppet effect at all; a pre-existing empty mesh that
must stay). The puppet viewer tests were built and run locally (15 pass; the new
test fails with the fix disabled). Clippy and the engine test suite were not
run locally; CI is the check for those.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* #4368: add the missing properties of the smaller effects
Adds the After Effects properties missing from Paint Beads, Sphere Wrap, Card Wipe,
Warp Stabilizer, Cylinder Wrap, Vector Blur, Light Rays, Page Curl, Plastic Shading, Radio
Waves, Slant and Block Reveal, Bulge, Color Neutralizer, Convolution Kernel, Cross Blur,
Directional Smear, Dual Lens Warp, Edge Tile Repeat, Environment Map, Hexagonal Tiles,
Kaleidoscope, OCIO CDL Transform, Organic Displacement, Paint Bucket, Radial Blur, Radial
Light Burst, Refine Soft Matte, Source Composite, Strobe Light, Surface Spotlight, Temporal
Motion Blur, Turbulent Displace, Two-Point Bend and Wave Warp. New properties sit in After
Effects order and drive the render; defaults reproduce the previous output and old projects
load unchanged (Card Wipe's new Y/Z jitter speeds start from the old single speed). GPU paths
fall back to the CPU when a new control is active.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: review fixes (identity pixels at High antialiasing, light normalisation, 100% blend)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: fix the deferred review findings (Page Curl, Edge Tile, Plastic, Chatter Reduction, Hexagonal Tiles, Warp Stabilizer)
- Page Curl: the corner drag places the fold so the corner lands on Fold Position for any curl radius; an unmoved corner shows no Back Page; the GPU path falls back to the CPU for corner drags and Back Page layers.
- Edge Tile: Repeat Blend Borders blends with what the neighbouring tile shows, flip included.
- Plastic Shading: Ambient Light Color tints only the ambient term, lit with the light colour, and nothing without ambient light.
- Refine Soft Matte: Chatter Reduction rejects outer frames where the matte moves.
- Hexagonal Tiles: Lock Center Tile keeps the grid centred on the layer while Center moves the picture.
- Warp Stabilizer: the Target Layer is fitted over the whole frame, not this layer's buffer bounds.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: legacy Roto Brush keys leave out the parameters added since 0.24
Roto Brush keys saved by 0.22-0.24 hash the Debug text of every effect above the brush. The
new properties of #4368 (Warp Stabilizer's Advanced options among them) are added when such
a project opens, so the legacy key no longer matched and the saved analysis was dropped
(tests::analysis_signature). The legacy text now leaves out each parameter added since 0.24
while it still holds the value an old project gets (its default, or for Card Wipe's split
jitter speeds the single speed), along with a layer parameter's source choice and groups of
only new parameters.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: review fixes (Curve Size, Paint Beads light and GPU fallback, Radial Blur seed, pinned High antialiasing, Card Wipe keys, ambient tint, target Source)
- Radio Waves: Curve Size subdivides its own interval, so small sizes draw their own curve.
- Paint Beads: point-light height follows the layer size, not a padded buffer; the GPU path
hands non-default Wobble, Light and Shading to the CPU.
- Radial Blur: seeded Zoom jitter is half a real ladder step and never crosses the centre.
- High antialiasing keeps pixels the warp leaves in place at their centre (pinned edges).
- Card Wipe migration copies an animated shared jitter speed (keyframes, expression); the
legacy Roto Brush key compares the copy in full.
- Plastic Shading: the Ambient Light Color clamp limits only the tint's change.
- Warp Stabilizer: the Target Layer honours its Source choice.
- tests_4368: an unknown parameter fails the test instead of passing.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: Plastic Ambient Light Color scales with the light intensity
At Light Intensity 0 the surface is unlit (the layer as it is), so the ambient tint is scaled
by the intensity as the light colour is: a black Ambient Light Color no longer turns it black.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #4368: Two-Point Bend Preserve Length renders on the CPU
The GPU kernel draws only the Normal arc mapping; Distort = Preserve Length is listed in the
catalog's CPU-only controls so the effect falls back to the CPU (Normal stays on the GPU).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* 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)
* Text: Character and Paragraph changes reach all selected text layers (#2862)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
* Text: the layer-wide stroke order leaves a locked shown layer alone (#2862)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
* Text: the panels show the first unlocked selected layer, not a locked one above it (#2862)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
* #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 <[email protected]>
* #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 <[email protected]>
* #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 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* Puppet: a mesh that spreads a pin's pull and keeps its area (#2866)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
* Tests: the off-mesh pin test checks a pin was added (#2866)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
* #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 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: FredApps <[email protected]>
* 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.
* Shapes: Add Merge Paths merges what's above it and paints the result (#2175)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Tests: check the fix directly instead of assuming history or the tool's colour
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* 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 <[email protected]>
* Shapes: Add Merge Paths' gradient runs across paths with no paint yet (#2175)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Shapes: a Repeater below an added Merge Paths doesn't widen its gradient (#2175)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Shapes: a Stroke among the paths doesn't widen an added Merge Paths' gradient (#2175)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Shapes: Add > Merge Paths gradient ignores an open line apart from the shapes (#2175)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Shapes: format the Merge Paths gradient test (#2175)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
* #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 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* 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
* 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 <[email protected]>
Co-authored-by: Fredrik Hallin <[email protected]>
* 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 <[email protected]>
* 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 <[email protected]>
---------
Co-authored-by: Claude Opus 5.5 <[email protected]>
* #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.
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.
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.
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.
* #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 <[email protected]>
* 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)
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.
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.
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.
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.
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.
`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.
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.