EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge branch 'worktree-agent-a94e35b1679a89a56'
Brandon Thomase1f72413e0b3
diff --cc README.mdindex 24006fbd9,576c8093e..d4ccd4ace--- a/README.md+++ b/README.md@@@ -179,8 -185,8 +185,8 @@@ tests, layering, asset attribution and## Where it standsEffectCraft is young. The core of After Effects is in place and gets deeper every week: what is--done and what comes next is in the [ROADMAP](ROADMAP.md). Not there yet: motion tracking, puppet,- paint and roto tools, Lottie and GPU compositing. The web build-paint and roto tools, preferences and a shortcut editor, and GPU compositing. The web build++done and what comes next is in the [ROADMAP](ROADMAP.md). Not there yet: Roto Brush, Warp++Stabilizer and the 3D camera tracker, Advanced 3D, on-canvas text editing and GPU compositing. The web build([docs/web.md](docs/web.md)) runs the full app in the browser, single-threaded for now. Projectsare saved as `.ecproj`, readable versioned JSON; After Effects `.aep` files cannot be opened.diff --cc ROADMAP.mdindex 106b464db,e9061b774..3e79f52e7--- a/ROADMAP.md+++ b/ROADMAP.md@@@ -17,20 -17,10 +17,20 @@@ once| M8 | Expressions with the After Effects object model | Done || M9 | Text and effects: text animators, layer styles, 259 effects incl. time and audio effects | Done (range, wiggly and expression selectors, per-character 3D, text on a path) || M10 | Export: render queue, H.264, ProRes, image sequences, GIF, audio | Done |- | M11 | Animation tools: audio playback, meters and waveforms (done); presets, Motion Sketch, Wiggler, Lottie | In progress |+ | M11 | Animation tools: audio playback, meters and waveforms, Lottie import and export (done); presets, Motion Sketch, Wiggler | In progress || M12 | Performance: layer cache and parallel compositing (done), GPU compositing, disk cache, motion tracking | In progress |-| M13+ | Puppet, paint, roto, motion tracking, preferences and shortcut editor, a plugin API | Planned |+| M13+ | Puppet, paint, roto, motion tracking, a plugin API | Planned || M15 | The web app (WebAssembly, WebGPU) | Done, single-threaded |-| M14 | Built for agents: MCP server, command-line tool, control channel | Done |+| M14 | Built for agents: MCP server, command-line tool, control channel; Settings, keyboard shortcut editor, auto-save and crash recovery ([docs/preferences.md](docs/preferences.md)) | Done |++## How far from full parity++Measured feature by feature in [docs/parity.md](docs/parity.md) (2 October 2026):++- **≈ 64% of After Effects' features, weighted by importance** (75% of the essentials, 38% of+ professional daily-use features, 17% of the long tail); 257 of 298 effects.+- **≈ 167 agent-hours of work remain**, about **42–50 hours of wall-clock time** with five Claude+ Opus 5.5 agents working in parallel (≈ 31–35 hours for the essentials and daily-use features).+- Hardest remaining pieces: on-canvas text editing, GPU rendering, tracking and roto, Advanced 3D.Come tell us what matters most to you on [Discord](https://discord.gg/artcraft).diff --cc crates/engine/Cargo.tomlindex 9d77eea49,eef636bf7..132bdcacd--- a/crates/engine/Cargo.toml+++ b/crates/engine/Cargo.toml@@@ -20,7 -20,7 +20,8 @@@ effectcraft-path = { workspace = trueeffectcraft-text = { workspace = true }effectcraft-effects = { workspace = true }effectcraft-render = { workspace = true }+effectcraft-track = { workspace = true }+ effectcraft-lottie = { workspace = true }serde = { workspace = true }serde_json = { workspace = true }thiserror = { workspace = true }diff --cc crates/engine/src/commands/mod.rsindex 0795bba34,d175a81b2..d0fcfd21f--- a/crates/engine/src/commands/mod.rs+++ b/crates/engine/src/commands/mod.rs@@@ -15,13 -15,12 +15,15 @@@ mod layermod layer_menu;mod layer_time;mod link;+ mod lottie;mod mask;+pub mod paint;+ mod paths;mod prop;+pub mod puppet;mod query;mod render_queue;+mod settings;mod stubs;mod styles;mod text_anim;@@@ -104,12 -103,9 +107,13 @@@ pub fn command_specs() -> &'static [Comv.extend(animation::specs());v.extend(view::specs());v.extend(file_more::specs());+ v.extend(lottie::specs());v.extend(comp_more::specs());v.extend(frontend::specs());+ v.extend(track::specs());+ v.extend(paint::specs());+ v.extend(puppet::specs());+ v.extend(settings::specs());v.extend(stubs::specs());v})diff --cc crates/engine/src/commands/stubs.rsindex 76cbd18cc,d83424971..c04f1f98f--- a/crates/engine/src/commands/stubs.rs+++ b/crates/engine/src/commands/stubs.rs@@@ -83,11 -66,10 +66,8 @@@ pub fn specs() -> Vec<CommandSpec>stub!("text.animatorFontAxes", "Variable Font Axes", ["Animation", "Animate Text"], "{}"),stub!("track.camera", "Track Camera", ["Animation"], "{}"),stub!("track.warpStabilizer", "Warp Stabilizer VFX", ["Animation"], "{}"),- stub!("track.motion", "Track Motion", ["Animation"], "{}"),stub!("track.mask", "Track Mask", ["Animation"], "{}"),- stub!("track.property", "Track this Property", ["Animation"], "{}"),// Workspaces and panels that don't exist yet.- stub!("window.saveWorkspace", "Save Changes to this Workspace", ["Window", "Workspace"], "{}"),- stub!("window.saveWorkspaceAs", "Save as New Workspace...", ["Window", "Workspace"], "{name}"),- stub!("window.editWorkspaces", "Edit Workspaces...", ["Window", "Workspace"], "{}"),stub!("window.unavailablePanel", "Panel", [], "{panel}"),]}diff --cc crates/engine/src/lib.rsindex f1af01110,2295c4a5d..8b5c5f43b--- a/crates/engine/src/lib.rs+++ b/crates/engine/src/lib.rs@@@ -160,15 -153,19 +160,28 @@@ pub struct EditorState/// Viewer 3D view per comp (Active Camera / Front / … / Custom View 3 and edited view cameras).#[serde(default)]pub views3d: std::collections::BTreeMap<ItemId, effectcraft_render::three_d::Views3D>,+ /// Tracker panel ▸ Current Track: (tracked layer, tracker group uid) in the active comp.+ #[serde(default)]+ pub current_track: Option<(LayerId, Uid)>,+ /// Paint and Brushes panel options (Brush, Clone Stamp and Eraser tools).+ #[serde(default)]+ pub paint: commands::paint::PaintOptions,+ /// Puppet tool options for new meshes.+ #[serde(default)]+ pub puppet: commands::puppet::PuppetOptions,+ /// View ▸ Switch View Layout: 1, 2 or 4 views side by side in the Composition viewer.+ #[serde(default = "one_view")]+ pub view_layout: u8,+ /// View ▸ Switch View Layout ▸ Share View Options (grid, guides… in every view).+ #[serde(default)]+ pub share_view_options: bool,+ /// Layer ▸ Mask ▸ Hide Locked Masks (viewer outlines).+ #[serde(default)]+ pub hide_locked_masks: bool,+ }++ fn one_view() -> u8 {+ 1}/// What Copy with Property Links / Copy Expression Only put on the clipboard.@@@ -505,12 -467,12 +518,16 @@@ mod tests#[cfg(test)]mod tests_3d;#[cfg(test)]+mod tests_effects;+#[cfg(test)]+ mod tests_lottie;+ #[cfg(test)]mod tests_menu_cmds;#[cfg(test)]+mod tests_settings;+#[cfg(test)]+ mod tests_stubs;+ #[cfg(test)]mod tests_styles;#[cfg(test)]mod tests_text;diff --cc crates/project/src/props.rsindex 496547d80,58f66433e..c1a3e3b93--- a/crates/project/src/props.rs+++ b/crates/project/src/props.rs@@@ -170,10 -176,24 +179,26 @@@ pub enum GroupKind/// Effect spec id, e.g. `ec.blur.gaussian`.effect: String,},+ /// A motion tracker (Motion Trackers ▸ Tracker n) with its Tracker panel settings.- Tracker {- settings: Box<crate::tracking::TrackerSettings>,- },++ Tracker { settings: Box<crate::tracking::TrackerSettings> },+ }++ /// Mask motion blur (sub-frame samples of an animated mask path).+ #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]+ pub enum MaskMotionBlur {+ /// Blur when the layer's Motion Blur switch is on.+ #[default]+ SameAsLayer,+ On,+ Off,+ }++ /// How a mask's feather ramps: Smooth (Gaussian) or Linear.+ #[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]+ pub enum FeatherFalloff {+ #[default]+ Smooth,+ Linear,}#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Serialize, Deserialize)]diff --cc crates/ui-egui/src/header.rsindex 5d22a582b,d26c0bd27..07e5b8442--- a/crates/ui-egui/src/header.rs+++ b/crates/ui-egui/src/header.rs@@@ -195,37 -192,10 +195,37 @@@ pub fn show(app: &mut EffectcraftApp, u}}+/// Puppet tool options: Mesh: Show, Expansion, Density (for new meshes and the selected+/// layer's meshes). Returns the next x.+fn puppet_options(app: &mut EffectcraftApp, ui: &mut egui::Ui, p: &egui::Painter, mut x: f32, cy: f32) -> f32 {+ let t = app.tokens;+ let o = app.session.state.puppet.clone();+ p.text(pos2(x, cy), Align2::LEFT_CENTER, "Mesh:", Tokens::ui(12.0), t.text_dim);+ x += 40.0;+ let show = Rect::from_min_size(pos2(x, cy - 10.0), vec2(20.0, 20.0));+ if widgets::checkbox(ui, show, o.show_mesh, &t, egui::Id::new("puppet-show-mesh")).clicked() {+ let _ = app.session.execute("puppet.mesh", json!({"showMesh": !o.show_mesh}));+ }+ app.auto.add("header.puppet.showMesh", show, "Show mesh");+ p.text(pos2(show.max.x + 2.0, cy), Align2::LEFT_CENTER, "Show", Tokens::ui(12.0), t.text_dim);+ x = show.max.x + 44.0;+ for (label, key, v, range) in [("Expansion:", "expansion", o.expansion, (-100.0, 200.0)), ("Density:", "density", o.density, (0.0, 100.0))] {+ p.text(pos2(x, cy), Align2::LEFT_CENTER, label, Tokens::ui(12.0), t.text_dim);+ x += if key == "expansion" { 64.0 } else { 52.0 };+ let (r, nv, _) = widgets::hot_number_at(ui, pos2(x, cy - 9.0), egui::Id::new(("puppet-opt", key)), v, 0.2, range, 0, "", &t);+ app.auto.add(&format!("header.puppet.{key}"), r, label);+ if let Some(nv) = nv {+ let _ = app.session.execute("puppet.mesh", json!({key: nv, "merge": format!("puppet-opt-{key}")}));+ }+ x = r.max.x + 12.0;+ }+ x + 4.0+}+fn ws_menu(app: &mut EffectcraftApp, ui: &mut egui::Ui) {- for w in crate::dock::WORKSPACES {- if ui.selectable_label(app.ui.workspace == w, w).clicked() {- app.set_workspace(w);+ for w in app.workspace_names() {+ if ui.selectable_label(app.ui.workspace == w, &w).clicked() {+ app.set_workspace(&w);ui.close();}}diff --cc crates/ui-egui/src/panels/viewer.rsindex ba233e67e,477441e66..a02c9b3a3--- a/crates/ui-egui/src/panels/viewer.rs+++ b/crates/ui-egui/src/panels/viewer.rs@@@ -213,7 -201,83 +213,83 @@@ fn parent_inverse(ctx: &EvalCtx, layer}}+ /// Draw the extra views of a 2- or 4-view layout and return the main view's rectangle.+ fn aux_views(+ app: &mut EffectcraftApp,+ ui: &mut egui::Ui,+ comp: &effectcraft_engine::project::Comp,+ cid: effectcraft_engine::project::ItemId,+ full: Rect,+ bg: Color32,+ ) -> Rect {+ let n = app.session.state.view_layout;+ if n < 2 {+ return full;+ }+ let gap = 2.0;+ let (main, aux): (Rect, Vec<(Rect, View3D)>) = if n == 2 {+ let mid = full.center().x;+ (Rect::from_min_max(pos2(mid + gap / 2.0, full.min.y), full.max), vec![(Rect::from_min_max(full.min, pos2(mid - gap / 2.0, full.max.y)), View3D::Top)])+ } else {+ let c = full.center();+ let q = |x0: f32, y0: f32, x1: f32, y1: f32| Rect::from_min_max(pos2(x0, y0), pos2(x1, y1));+ (+ q(c.x + gap / 2.0, c.y + gap / 2.0, full.max.x, full.max.y),+ vec![+ (q(full.min.x, full.min.y, c.x - gap / 2.0, c.y - gap / 2.0), View3D::Top),+ (q(c.x + gap / 2.0, full.min.y, full.max.x, c.y - gap / 2.0), View3D::Front),+ (q(full.min.x, c.y + gap / 2.0, c.x - gap / 2.0, full.max.y), View3D::Right),+ ],+ )+ };+ let ctx = ui.ctx().clone();+ let p = ui.painter().clone();+ p.rect_filled(full, 0.0, Color32::from_black_alpha(200));+ let t = app.session.time();+ let (cw, ch) = (comp.width as f32, comp.height as f32);+ let views = app.session.state.views3d.get(&cid).cloned().unwrap_or_default();+ let share = app.session.state.share_view_options;+ for (i, (r, v)) in aux.into_iter().enumerate() {+ p.rect_filled(r, 0.0, bg);+ let fit = ((r.width() - 20.0) / cw).min((r.height() - 20.0) / ch).max(0.01);+ let cr = Rect::from_center_size(r.center(), vec2(cw * fit, ch * fit));+ let scale = (fit * ctx.pixels_per_point()).min(1.0) as f64;+ let cam = views.cam(v, comp.width as f64, comp.height as f64).state();+ let key = {+ use std::hash::{Hash, Hasher};+ let mut h = std::collections::hash_map::DefaultHasher::new();+ (app.session.revision, cid.0, t.0, i, scale.to_bits(), format!("{cam:?}")).hash(&mut h);+ h.finish()+ };+ let id = egui::Id::new(("viewer-aux", i));+ let cached: Option<(u64, egui::TextureHandle)> = ctx.data(|d| d.get_temp(id));+ let tex = match cached {+ Some((k, tex)) if k == key => tex,+ _ => {+ let opts = effectcraft_engine::render::RenderOpts { scale, view: comp.has_3d().then_some(cam), draft: true, ..Default::default() };+ let img = app.session.render(cid, t, opts);+ let tex = ctx.load_texture(format!("viewer-aux-{i}"), crate::frames::to_color_image(&img), egui::TextureOptions::LINEAR);+ ctx.data_mut(|d| d.insert_temp(id, (key, tex.clone())));+ tex+ }+ };+ let b = comp.background;+ p.rect_filled(cr, 0.0, Color32::from_rgb((b[0] * 255.0) as u8, (b[1] * 255.0) as u8, (b[2] * 255.0) as u8));+ p.image(tex.id(), cr, Rect::from_min_max(pos2(0.0, 0.0), pos2(1.0, 1.0)), Color32::WHITE);+ p.rect_stroke(cr, 0.0, Stroke::new(1.0, Color32::from_black_alpha(160)), StrokeKind::Outside);+ if share && app.ui.viewer.safe_margins {+ for k in [0.9, 0.8] {+ p.rect_stroke(Rect::from_center_size(cr.center(), cr.size() * k), 0.0, Stroke::new(1.0, Color32::from_white_alpha(120)), StrokeKind::Middle);+ }+ }+ let label = if comp.has_3d() { v.label() } else { "Active Camera" };+ p.text(r.left_bottom() + vec2(8.0, -8.0), Align2::LEFT_BOTTOM, label, Tokens::ui(11.0), Color32::from_white_alpha(200));+ app.auto.add(&format!("viewer.view.{}", v.id()), r, label);+ }+ main+ }+-fn checker(p: &egui::Painter, r: Rect) {+pub(crate) fn checker(p: &egui::Painter, r: Rect) {let s = 10.0;p.rect_filled(r, 0.0, Color32::from_gray(0xcc));let mut y = r.min.y;