Repository navigation
feat: Figma import, project import, Effect Console, relink moved footage, shape and timeline editing, AZERTY shortcuts, Graph Editor zoom and a render benchmark - #858
Conversation
With --compare, exits 1 when a matched run got more than PCT % worse in CPU time, peak memory, max RSS or instructions retired (wall time follows the load and is never gated). Checks: xtask fail_over test (1 passed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TEytG1Qum4TJrMTLKjgwDa (cherry picked from commit c34be4d) (cherry picked from commit 6e3eab96493726c551ec1e66174ac08b5591e4c2) (cherry picked from commit 2e066f4)
…s at the pointer
A small search bar opens at the pointer (Edit > Effect Console..., app.fxConsole {query?}).
It ranks effects, text presets and user presets by name, word starts, initials (gb = Gaussian
Blur) and letters in order, boosting recent and favourite effects and sinking Obsolete ones.
Enter applies to the selected layers and closes, Shift+Enter applies and stays open, arrows
choose, Escape / Ctrl+Space / a click outside close. With no text it lists recent effects.
Off macOS a Ctrl shortcut now also expects the command flag egui reports with Ctrl.
(cherry picked from commit c88580b)
(cherry picked from commit c508d92a93299f0f5ec7986fc1c6f84aa243ff33)
(cherry picked from commit 36f3d65)
footage.relink {item, path} relinks one item and every other missing item that moved with it (one undo
step); Replace Footage on a missing item does the same, as in After Effects. File > Dependencies >
Relink Missing Footage in Folder... (footage.relinkFolder) finds missing files by name in a folder;
footage.missing lists them. The footage check after open finds files that moved along with the
project's folder, without marking the project modified. Paths compare by parts, so Windows and macOS
projects relink either way.
Checks: engine relink:: / footage_check:: (13 passed with replay::), host relink:: (1 passed),
clippy -D warnings (engine, host, ui-egui, script, cli, xtask). Not run: ui-egui i18n tests.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TEytG1Qum4TJrMTLKjgwDa
Upstream port: the folder search (footage.relinkFolder) is left out, since upstream's file.relinkFootage already scans a folder; the module is relink_moved.rs next to upstream's relink.rs.
(cherry picked from commit ea79235)
(cherry picked from commit d15e853a720304c1032e21974d84e1501c6edfc3)
(cherry picked from commit 0b8a328)
Every fill and stroke allocated a coverage mask the size of the whole canvas and painted every canvas pixel, so a vector file cost shapes × canvas area: SceneYard "Retro Desktop Movie Popups" spent 556 s per frame on one 4001×2501 Illustrator layer (568 s a frame in all). Each shape now rasterises and paints only inside its device-space bounding box (+1 px of anti-aliasing) clipped to the canvas; a stroke uses the bounds of its outline. The frame renders in 5–7 s (bench, no cache). Pixels match the whole-canvas version except a few anti-aliased edge pixels (float rounding of the re-based transform). A test checks that every pixel a shape covers lies inside its rectangle, and pins the output. (cherry picked from commit 58d369b) (cherry picked from commit 7fdbbc5188ab5d420448f47a726bee6a046e6936) (cherry picked from commit 5efd7aa)
The TextEdit inside widgets::field took its natural height at the top of the field, so vertical_align(Center) had no room to act and the placeholder sat ~2pt above the magnifier (Timeline, Project, Effects & Presets, Home). (cherry picked from commit 6806eb4) (cherry picked from commit af85d220bc337d5a3c6fa94b6fa315b0d3b0c09b) (cherry picked from commit 685b7f2)
…particles The particles were composited with the original layer by the Transfer Mode, so the solid an artist applies them to stayed visible. After Effects 2026 frames show no trace of it: SceneYard "Burnout matchstick" (a red rectangle around the flame), "Documentary Man Falling" (a black block over the light), "Task Preparation UI" (black solids under fireworks). The Transfer Mode now only sets how the particles meet each other. Mean abs error vs AE: Burnout matchstick 0.0191 -> 0.0130, Documentary Man Falling 0.1177 -> 0.0937 (Task Preparation also needs the next commit). (cherry picked from commit 3eb3b99) (cherry picked from commit 729638710e63f4da10711fc5e6a1f7ddc42c37aa) (cherry picked from commit 0833321)
Echo, Posterize Time and the other Time effects read the layer at other times with none of its effects. After Effects renders them with the effects before them: SceneYard "Task Preparation UI" applies Echo after CC Particle Systems II on black solids, and AE shows the echoed fireworks over a white page where we echoed the black solids and blacked it out (Posterize Time after Turbulent Displace, the usual stop-motion setup, depends on the same). The host already bounds the count to the effects before the one rendering. Mean abs error vs AE: Task Preparation UI 0.1855 -> 0.0071, Lightbulb Idea 0.0126 -> 0.0102; the 15 other corpus projects with a Time effect after another effect are pixel-identical. (cherry picked from commit 4687045) (cherry picked from commit 334d102582e5a64db32e2f3e55836d55ac96bdaa) (cherry picked from commit 734da3e)
…Start/End Shortcut presets accept Physical+<key> (egui US-position names) so layouts that report the same logical key for two physical keys (AZERTY's - and )) can bind them separately; physical bindings win for that press, and a focused panel's binding wins over an application command on the same chord. ui.key accepts the same notation. Adds time.workAreaStart / time.workAreaEnd. (cherry picked from commit 209543e) (cherry picked from commit f8301a9e3e0b60e200e8a233455398741658481e) (cherry picked from commit 4d002fa)
…End, as in After Effects Split out of 7782ab0 (shapes: Reverse Path Direction …; work area keys) for upstream, where it belongs with the commands it binds. (cherry picked from commit 7782ab0) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F2dXDtF1ivCLP4tQwFveQ4 (cherry picked from commit b58cfb7434e147535e66582718b8856bd3ce1230) (cherry picked from commit ff48760)
…der clicks work The Timeline footer's zoom-out / zoom-in mountain icons were painted but not interactive, and the zoom slider only reacted to drags (a click on the track did nothing) and set the zoom without the whole-comp clamp. The icons are now buttons (timeline.zoomOutButton / timeline.zoomInButton, one = / - step), the slider jumps on click, and both go through set_zoom, centred on the CTI. The layer bars and the Graph Editor share one time zoom (TimelineState start / pps, as in After Effects); regression tests drive = / -, the buttons, the slider and the navigator over the control channel in both views and check switching views keeps the zoom. Co-Authored-By: Claude <noreply@anthropic.com> (cherry picked from commit 2ee0fb6) (cherry picked from commit f1997d32d4c51b58467a04944889131fd741a22a) (cherry picked from commit 1c25aeb)
Opening the Graph Editor (header button, menu, Shift+F3, control channel) frames the graphs on its first frame: Fit Selection to View when keys are selected, else Fit All Graphs to View. Switching value/speed graph refits too (different units). A selected key now shows its property's graph even when its layer isn't selected, and Fit Selection on a lone key also frames its neighbouring keys. Co-Authored-By: Claude <noreply@anthropic.com> (cherry picked from commit a3c95f6) (cherry picked from commit d6309ffad79b91676d6409d1845de508e485873d) (cherry picked from commit 78f5574)
…d shape layers
With shape layers selected, Option-clicking the Fill/Stroke swatch or picking a kind,
blend mode or opacity in Fill/Stroke Options only changed the shape tools' defaults
(shape.toolOptions); the layers kept their paint (e.g. Fill: None left the blue fill).
shape.fillStroke now takes fillType/strokeType (none|solid|linear|radial, or
fill/stroke: false), fillBlend/strokeBlend and fillOpacity/strokeOpacity, applied to
every Fill/Stroke and Gradient Fill/Stroke in the layers' contents (nested groups too),
one undo step:
- None switches the items off (eye off, kept, as After Effects does); the renderer
already skips disabled items.
- Solid switches them on; Linear/Radial convert Fill <-> Gradient Fill and
Stroke <-> Gradient Stroke in place, keeping shared properties (uids, blend, opacity,
width, dashes, taper, wave) and the item number ("Fill 2" -> "Gradient Fill 2").
- Paths with no fill get one for a fill kind; with no stroke one for a stroke kind.
- Reports fillType/strokeType of the first layer (new pub first_kinds).
Header: the Alt-click kind cycle and the Options popup (kinds, blend, opacity) also
call shape.fillStroke on the selected shape layers; the swatches show the selected
layer's kinds.
(cherry picked from commit e28f2bd)
(cherry picked from commit 4d514362dff9dfd5ae5d168daf119dbf7802e49b)
(cherry picked from commit addd064)
… rows
- shape.reversePathDirection {layer?, prop?, reversed?}: one undoable step; toggles the
selected items without prop. The Timeline shows the ⇄ button on shape item rows; Path
Direction stays hidden as a property row. Trim Paths then runs the other way.
- Scripting: ADBE Vector Shape Direction is settable despite being hidden, with After
Effects' values (1 Default, 2 normal, 3 Reversed) mapped to ours (0/1) and read back as 1/3.
- AEP import: AE's Reversed (3) imported as 2 (not reversed); now maps to 1.
- Go to Work Area Start/End get AE's defaults Shift+Home / Shift+End.
Upstream port: the Shift+Home / Shift+End work-area bindings and the After Effects-import part are left out (they build on fork work not upstream yet).
(cherry picked from commit 7782ab0)
(cherry picked from commit c21cb5b74430cae267a46fdc835a4cf1ed32fc9a)
(cherry picked from commit f79c41e)
The In/Out trim zones were 6 pt strips inside the bar only: at or just outside an end the pointer got the default cursor, and on footage/precomp layers just outside the end it hit the slip zone, which shows the same arrow but slips the source instead of trimming. Zones now reach 4 pt outside and up to 5 pt inside each end (short bars keep their middle third as body), registered after the slip zones so trimming wins there. The trim zones show the system resize cursor (upstream port: the fork also offers an owner-local cursor, left out here). Test: ui_timeline_trim. (cherry picked from commit e2490f8) (cherry picked from commit b704fc52c4fdb43816721e95d13f132a11062aa1) (cherry picked from commit 17faf9c)
…shape rect roundness), roundness on new shapes, Layer › Create › Round Corners, MCP test Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rc1XNFw6vDovyoYpwHj9Py (cherry picked from commit f3cd3cc) # Conflicts: # crates/engine/src/commands/mod.rs (cherry picked from commit cec4b6633045617064a6857d4a0c3aea1ae8408f) (cherry picked from commit 63da1f2)
…ow for solids Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rc1XNFw6vDovyoYpwHj9Py (cherry picked from commit 33d849f) # Conflicts: # crates/ui-egui/src/panels/properties.rs # crates/ui-egui/tests/ui/main.rs (cherry picked from commit a593488c211864735b3a6e8f087159235ed8184b) (cherry picked from commit 8457f32)
…pping Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rc1XNFw6vDovyoYpwHj9Py (cherry picked from commit 5e86b07) (cherry picked from commit e10c7e62a63a282e695d982d86e78554059fb1ff) (cherry picked from commit 99ae078)
File > Import > EffectCraft Project (and .ecproj/.ecprojx given to File > Import) merges the project into a folder named after the file, with every id shifted past the open project's, in one undo step. Relative footage resolves next to the file; the result lists comps, root comps, primaryComp and missing media. offset_ids now shifts tracker Motion Targets and saturates instead of overflowing; fix_next_id saturates too, so a damaged file can't overflow on open or import. Menu entry translated in all four languages. (cherry picked from commit 19c653f) (cherry picked from commit f4d36d11b0ccdfc56371a3bbd8d43d3b8281ee1b) (cherry picked from commit c08135b)
file.importFigma brings Figma frames and layers in as native, editable layers (comps/precomps, group nulls, shape layers with editable paths, fills, gradients, strokes, text with style runs, track mattes, layer styles, Gaussian Blur), from a Figma link via the REST API (system curl, token from FIGMA_TOKEN / figma.setToken, never journaled) or from node JSON passed in. Image fills and unsupported nodes come in as 2x PNG renders. One undo step per import. effectcraft-cli figma-bridge is the local HTTP endpoint for the Figma plug-in in integrations/figma. Co-Authored-By: Claude <noreply@anthropic.com> (cherry picked from commit 8836faa) (cherry picked from commit ae6f1da39093854a2539696fbfe025cd20843c01) (cherry picked from commit 5989be7)
…d Corners and Import EffectCraft Project Those changes predate the two catalogues; every fixed menu entry needs a translation (i18n::tests::every_translation_key_exists_in_the_actual_menu_tree). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LTWkKLJDAs32jGPyEZAX2w
…rytold#859 storytold#860; fidelity harness waits for agents-1
|
Thank you for the huge amount of work here, @eliasx45! A lot of it is valuable, but at +9.7k lines across many features it's hard to review and land as one piece. Could you split it into focused PRs (Figma import, project import, Effect Console, relink, shape/timeline editing, AZERTY shortcuts, bench xtask)? Effect Console also overlaps #918. Security notes on the Figma part:
If you're not on our Discord yet, come join us: https://discord.gg/artcraft |
Follow-up to the review of storytold#858. - Figma REST: requests that carry the X-Figma-Token never follow redirects (curl forwards custom headers to redirect targets; Figma's API doesn't redirect). Only the token-less, pre-signed image download follows redirects, at most 5, HTTPS only. Every request is HTTPS-only (`--proto =https`); plain HTTP is left only for a loopback apiBase (tests). The curl options come from `curl_args`, which a unit test checks. - figma.setToken and the bridge's pairing code file are created with mode 0600 (`figma::write_private`: OpenOptions + mode; an existing wider file is narrowed before the secret is written), instead of write-then-chmod. - Figma bridge: the pairing code comes from the OS CSPRNG (getrandom, rejection-sampled into the 32-letter alphabet, 12 characters); after 5 wrong X-EffectCraft-Code values in a row, codes are refused for 60 s (429), a right code resets the count; request bodies are capped at 64 MiB (413), documented in integrations/figma/README.md. An explicit --code must have at least 8 characters. Tests: effectcraft-automation figma_bridge:: (10, incl. lockout, body cap, alphabet/length, code file mode); effectcraft-engine figma (16, incl. no -L with the token, 0600 token file, REST against a loopback fake API). Clippy -D warnings on engine, automation, cli, effectcraft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ue/ so the opener ignores it)
…told#858); reply 858 has PR numbers
|
Thanks for the careful review, @echelon, and fair point on the size. I've split this into focused PRs, each rebased on current
I dropped three commits that Figma security, all in #1103:
curl stays for the optional REST path for now. We have no HTTP/TLS stack in-tree, and model downloads already use the system curl the same way (the token goes in on stdin, never on the command line). The plug-in and MCP paths need neither a token nor curl. I'm happy to move both to a pure-Rust client in a follow-up if you'd prefer. Closing this one in favour of the split PRs. |
File > Import > EffectCraft Project (and .ecproj/.ecprojx given to File > Import) merges the project into a folder named after the file, with every id shifted past the open project's, in one undo step. Relative footage resolves next to the file; the result lists comps, root comps, primaryComp and missing media. offset_ids now shifts tracker Motion Targets and saturates instead of overflowing; fix_next_id saturates too, so a damaged file can't overflow on open or import. Menu entry translated in all ten menu catalogues. Rebased onto current upstream main for the split of #858 (test module list in engine lib.rs; es/pt-br/ru/fr/de/cs menu translations). (cherry picked from commit 19c653f) (cherry picked from commit 4e751ad) (cherry picked from commit ceed706cc3b5f3755769738a1ddb3d965a94ab6b)
What
Effects
app.fxConsole {query?}): asearch bar at the pointer ranking effects and presets by name, word starts, initials (
gb=Gaussian Blur) and letters in order, with recent and favourite effects first. Enter applies and
closes, Shift+Enter applies and stays open.
Mode only combines particles with each other), as in After Effects; particle golden hashes
re-pinned.
Import
file.importFigma: Figma frames and layers become native, editable layers (comps and precomps,group nulls, shape layers with editable paths, fills, gradients and strokes, text with style runs,
track mattes, layer styles, Gaussian Blur; image fills and unsupported nodes as 2× PNG renders),
from a Figma link through the REST API (system
curl; the token comes fromFIGMA_TOKEN/figma.setTokenand is never journaled) or node JSON; one undo step.effectcraft-cli figma-bridgeis a local HTTP endpoint for the Figma plug-in inintegrations/figma/.file.importProject {path};.ecproj/.ecprojxgiven toFile ▸ Import): merges a project into the open one, in a folder named after the file, every id moved
past the open project's, one undo step, relative footage resolved next to the imported file;
offset_idsalso shifts tracker Motion Targets and saturates instead of overflowing.Footage
footage.relink {item, path}and File ▸ Replace Footage on a missing item relink it and everyother missing item in the same relative place (moved folder, renamed drive), in one undo step;
footage.missing; the footage check after File ▸ Open finds files that moved with the projectfolder; Windows and macOS paths compare by their parts.
whole-canvas mask (a 4001×2501 Illustrator layer: about 556 s → 5–7 s per frame).
Shapes
Toolbar Fill / Stroke apply to selected shape layers:
shape.fillStroketakesfillType/strokeType(none|solid|linear|radial), blend modes and opacities, and applies them to everyFill / Stroke and Gradient Fill / Stroke, nested groups included, in one undo step (None switches
items off; Linear / Radial convert in place).
Reverse Path Direction (⇄) on Path, Rectangle, Ellipse and Polystar rows:
shape.reversePathDirection {layer?, prop?, reversed?}, one undo step; scripts setADBE Vector Shape Directionwith After Effects' values (1 Default, 3 Reversed).Properties panel: shape layers get a Layer Contents section (paths, Fill, Stroke); solids get a
Roundness row that turns the solid into a rounded-rectangle shape layer in one undo step;
layer.roundCorners {layer?, roundness}(Layer ▸ Create ▸ Round Corners, translated in the fourcatalogues); long row labels push their values right instead of overlapping.
Timeline and shortcuts
Physical+<key>(US-position names), so AZERTY's-and)bindseparately; a focused panel's binding wins over an app command on the same chord;
ui.keyacceptsthe notation. New
time.workAreaStart/time.workAreaEnd(Shift+Home / Shift+End).(
timeline.zoomOutButton/timeline.zoomInButton); a click on the slider track jumps there;opening the Graph Editor or switching value/speed graph fits the graphs; a selected key shows its
graph even when its layer isn't selected; the AZERTY zoom keys zoom the graph.
zones reach slightly outside layer bar ends and win over slipping; trimming a selected layer's
in/out trims every selected layer in one undo step (
inDelta/outDelta); a click on empty trackarea deselects layers.
UI polish
with an ellipsis; Reset and About… are centred on the Effect Controls header; Timeline ruler labels
that would run under the marker bin are skipped.
Benchmarks
cargo xtask bench: generated scenarios (demo comp; 1080p with 100 layers and effects; precompsthree deep; PNG-sequence, H.264 and 4K footage) rendered at Full and Half, recording peak memory,
CPU and wall time in
target/bench/results.jsonl;--comparean earlier run and--fail-over PCTto gate a change.
Why
Closer After Effects parity in daily workflows (Figma hand-off, importing a project into a project,
applying effects, relinking moved projects, shape fill/stroke and roundness, timeline trimming, AZERTY keyboards, Graph Editor zoom), measured fidelity fixes (particle and Echo scenes
against After Effects frames: mean absolute error 0.1855 → 0.0071 on Echo-after-particles), and
benchmark numbers tracked over time as docs/gaps.md asks.
How tested
rustfmt --edition 2024 --checkon every changed.rsfile: clean.cargo clippy --all-targets -- -D warningsfor automation, effects, engine, host, project, render,script, svg, ui-egui, effectcraft, effectcraft-cli and xtask: clean.
cargo check --target wasm32-unknown-unknownfor effects, engine, project, render, svg andscript: clean.
cargo testfor the same twelve packages: 1,957 passed. The menu-translation test found theSpanish and Portuguese catalogues missing three new entries; the last commit adds them, and the
ui-egui lib tests pass again.
main:theme::script_font_tests::arabic_words_are_joined_and_read_right_to_left.cargo xtask ci. Tests ran on a 4-core Linux runner without a GPU (wgpu onllvmpipe).
Cherry-picked with
-xtrailers from topic branches already adapted to currentmain.