EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge main (M6.7 roto) into IO-2/SHP-5/OUT-2/PRV-2 work
Brandon Thomasa2082761865f
diff --cc crates/engine/src/commands/edit.rsindex 9a134b05f,8ebd78db6..03cd80870--- a/crates/engine/src/commands/edit.rs+++ b/crates/engine/src/commands/edit.rs@@@ -525,38 -525,12 +525,41 @@@ fn purge_caches(s: &mut Session, p: &Vas.snapshot = None;s.state.viewer.show_snapshot = false;}+ let memory = matches!(what.as_str(), "all" | "memoryAndDisk" | "memory" | "image");+ let disk = matches!(what.as_str(), "all" | "memoryAndDisk" | "disk");+ if memory {+ s.layer_cache.clear();+ }+ let mut disk_entries = 0;+ if disk && let Some(dc) = &s.disk_cache {+ disk_entries = dc.stats().entries;+ dc.clear();+ }+ if matches!(what.as_str(), "all" | "image" | "memory" | "memoryAndDisk") {+ effectcraft_effects::roto::purge();+ }s.events.push(crate::Event::PurgeCaches);s.toast(format!("Purged {what} cache"));- Ok(json!({"purged": what}))+ Ok(json!({"purged": what, "diskEntries": disk_entries}))+}++/// `cache.diskStats`: the disk cache's folder, limit and contents.+pub(crate) fn disk_stats(s: &mut Session, _: &Value) -> Result<Value> {+ let Some(dc) = &s.disk_cache else { return Ok(json!({"enabled": false})) };+ let st = dc.stats();+ Ok(json!({+ "enabled": true,+ "folder": dc.folder().to_string_lossy(),+ "entries": st.entries,+ "frames": dc.keys(effectcraft_render::disk_cache::Kind::Frame).len(),+ "layers": dc.keys(effectcraft_render::disk_cache::Kind::Layer).len(),+ "bytes": st.bytes,+ "maxBytes": st.max_bytes,+ "hits": st.hits,+ "misses": st.misses,+ "writes": st.writes,+ "evictions": st.evictions,+ }))}/// Path of the footage behind the selected layer or project item.diff --cc crates/engine/src/lib.rsindex 107d4a1ee,3716958ff..0da0b36d2--- a/crates/engine/src/lib.rs+++ b/crates/engine/src/lib.rs@@@ -16,8 -16,8 +16,9 @@@ pub mod linkspub mod mask_track;pub mod menus;pub mod prefs;+pub mod psd_import;pub mod render_queue;+ pub mod roto;mod session_settings;pub mod shortcuts;pub mod tracking;diff --cc docs/parity.mdindex e16b6adff,96744c5a8..c93387e51--- a/docs/parity.md+++ b/docs/parity.md@@@ -73,11 -73,11 +73,11 @@@ library groundwork for mask tracking an| Remaining (audit-scale agent-hours) | ≈ 167 | ≈ 100 || Wall clock, five parallel agents | 42–50 h | **≈ 8–10 h at today's measured pace; ≈ 25 h by the audit's conservative figures** |- What is left is concentrated in large systems: Roto Brush and Refine Edge, the 3D camera tracker,+ What is left is concentrated in large systems: the 3D camera tracker,the Warp Stabilizer and mask-tracking UI on top of-the new tracking library, SVG/PSD import, WebM, a disk cache,+the new tracking library,native macOS menus, and wasm threads. (The missing effect categories, 3D Channel, Immersive Video- and OCIO, landed in M9.11; the scripting object model in M14.4.)+ and OCIO, landed in M9.11; the scripting object model in M14.4; Roto Brush and Refine Edge in M6.7.)## By area@@@ -97,8 -97,8 +97,8 @@@| Effects | ≈ 75% | 5.0 | GPU versions of more effects and the 3D Camera Tracker (every other After Effects effect exists since M9.11 and M12.5) || Interface | 55% | 10.4 | drag-to-dock and floating panels, preferences, native macOS menus (viewer rulers/snapping/channels/snapshots landed in M0.13) || Project | 53% | 8.1 | 8/16/32-bit pipeline and colour management, auto-save, proxies, folder moves |- | Masks & roto | 52% | 10.0 | Roto Brush, variable-width mask feather points (mask tracking and Mask Interpolation landed in M6.6) |+ | Masks & roto | 68% | 6.0 | variable-width mask feather points, Roto Brush's learned (3.0) segmentation model (mask tracking and Mask Interpolation landed in M6.6; Roto Brush & Refine Edge with graph-cut segmentation, flow propagation, edge matting, decontamination and Freeze in M6.7) |-| Preview | 55% | 6.1 | GPU 3D and adjustment layers, disk cache (region of interest, snapshots, exposure and Fast Previews landed in M0.13) |+| Preview | 62% | 5.0 | GPU 3D and adjustment layers (persistent disk cache with the blue cache bar landed; region of interest, snapshots, exposure and Fast Previews landed in M0.13) || Tracking | ≈ 70% | 4.0 | 3D camera tracker, face tracking and Subspace Warp's mesh warp (Rolling Shutter Repair landed in M9.11; point tracker, mask tracking and Warp Stabilizer landed in M6.x / M12.5) || Paint | 0% | 4.0 | Brush, Clone Stamp, Eraser |