M3.4: After Effects menu-bar parity (engine menu tree, ~190 new commands, menu dialogs)

- engine::menus: the AE 2026 menu bar as an indented tree (same menus, order,
  submenus, separators, "..." labels, AE default macOS shortcuts; [mac]/[!mac]
  app menu vs Edit > Preferences / File > Exit), entries bind command params,
  check-mark state, Effect categories from the registry.
- New engine commands: Layer (quality/sampling, frame blending, switch ops,
  numeric Transform values, Center Anchor Point, Auto-Orient, mask ops on
  existing masks, layer markers + lock, track-matte menu, open/reveal source,
  expression errors), Edit (keyframe clipboard + Paste Reversed, Copy with
  (Relative) Property Links, Copy Expression Only, Lift/Extract Work Area,
  Select Label Group, Purge, Edit Original), Animation (JSON animation
  presets, Add Keyframe, Exponential Scale, Time-Reverse Keyframes, Sequence
  Layers, text selectors, Remove All Text Animators, Reveal Properties),
  File (New Folder, Close/Close Project, Save a Copy, placeholders/solids,
  New Comp from Selection, Dependencies, Run Script File, Interpret/Remember/
  Apply Interpretation, Replace/Reload Footage, Reveal in Finder),
  Composition (crop to ROI / layer bounds, Save Frame As PNG, Responsive
  Design - Time), View (guides add/clear/import/export, region of interest),
  Help docs links.
- Frontend commands (viewer, panels, workspaces, dialogs) are registered
  engine commands that emit Event::Frontend; owned-elsewhere items (3D,
  render queue, time remap, pen, tracking, layer styles) are disabled stubs.
- UI renders the engine tree (check gutter, scrolling long submenus, dynamic
  Undo/Redo labels), bindings include param'd entries, generic parameter
  forms, Settings, Keyboard Shortcuts, View Options, guides/ROI/pasteboard in
  the viewer, timeline reveal of engine-picked properties; snapshot example
  gains a `pointer` step for opening menus headlessly.
- Tests: menu order, every entry resolves, spec/tree consistency, shortcut
  uniqueness, per-family command tests with undo.
- Workspace clippy -D warnings clean (rust 1.96 lints).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-01 22:36:31 -04:00
co-authored by Claude Opus 5.5
parent 4f47a01fed
commit b4b2950c5d
36 changed files with 5673 additions and 283 deletions
+47 -2
View File
@@ -11,6 +11,7 @@
pub mod commands;
pub mod demo;
pub mod links;
pub mod menus;
use std::sync::Arc;
@@ -110,15 +111,57 @@ pub struct EditorState {
pub snapping: bool,
/// Last applied effect id (Effect ▸ last effect).
pub last_effect: Option<String>,
/// Viewer region of interest `[x, y, w, h]` in comp pixels (Composition ▸ Crop Comp to Region
/// of Interest).
#[serde(default)]
pub region_of_interest: Option<[f64; 4]>,
/// Keyframe clipboard (Edit ▸ Copy with keys selected; Paste / Paste Reversed Keyframes).
#[serde(skip)]
pub key_clipboard: Vec<KeyClip>,
/// Property-link clipboard (Edit ▸ Copy with Property Links / Copy Expression Only).
#[serde(skip)]
pub link_clipboard: Option<LinkClip>,
/// File ▸ Interpret Footage ▸ Remember Interpretation.
#[serde(skip)]
pub interpretation: Option<effectcraft_project::Footage>,
}
/// Copied keyframes of one property, addressed by its match path (`transform/position`).
#[derive(Clone, Debug, PartialEq)]
pub struct KeyClip {
pub path: String,
pub keys: Vec<effectcraft_keyframe::Keyframe>,
}
/// What Copy with Property Links / Copy Expression Only put on the clipboard.
#[derive(Clone, Debug, PartialEq)]
pub enum LinkClip {
/// Expressions that link back to the source properties: (match path, expression text).
Links { relative: bool, links: Vec<(String, String)> },
/// Expressions only: (match path, expression).
Expressions(Vec<(String, effectcraft_project::Expression)>),
}
/// Events for frontends (drained each frame).
#[derive(Clone, Debug, PartialEq, Serialize)]
pub enum Event {
ProjectChanged { revision: u64 },
Toast { message: String, error: bool },
ProjectChanged {
revision: u64,
},
Toast {
message: String,
error: bool,
},
OpenComp(ItemId),
OpenUrl(String),
/// A frontend-only command (viewer zoom, panels, dialogs…) ran: the UI performs it. Headless
/// sessions ignore these.
Frontend {
command: String,
params: Value,
},
/// Drop cached frames / renders (Edit ▸ Purge).
PurgeCaches,
}
pub struct Session {
@@ -324,6 +367,8 @@ impl Session {
#[cfg(test)]
mod tests;
#[cfg(test)]
mod tests_menu_cmds;
/// Font families available to text layers (bundled + scanned system fonts).
pub fn text_families() -> Vec<String> {