mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-01 14:08:38 -06:00
- 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>
50 lines
2.1 KiB
Rust
50 lines
2.1 KiB
Rust
//! Help menu: community and project links (the frontend opens `Event::OpenUrl`).
|
|
|
|
use serde_json::{Value, json};
|
|
|
|
use super::{CommandSpec, always, str_p};
|
|
use crate::links;
|
|
use crate::{Event, Result, Session, cmd};
|
|
|
|
fn open(s: &mut Session, url: String) -> Result<Value> {
|
|
s.events.push(Event::OpenUrl(url.clone()));
|
|
Ok(json!({"url": url}))
|
|
}
|
|
|
|
fn sibling(s: &mut Session, p: &Value) -> Result<Value> {
|
|
let slug = str_p(p, "app").unwrap_or("photocraft").to_ascii_lowercase();
|
|
if str_p(p, "kind") == Some("github") { open(s, links::github_of(&slug)) } else { open(s, links::page_of(&slug)) }
|
|
}
|
|
|
|
/// Help ▸ EffectCraft Help / Scripting Help / Expression Reference / Effect Reference.
|
|
fn docs(s: &mut Session, p: &Value) -> Result<Value> {
|
|
let page = match str_p(p, "page").unwrap_or("help") {
|
|
"scripting" => "docs/control-protocol.md",
|
|
"expressions" => "docs/expressions.md",
|
|
"effects" => "docs/effects.md",
|
|
"agents" => "docs/agents.md",
|
|
_ => "README.md",
|
|
};
|
|
open(s, format!("{}/blob/main/{page}", links::GITHUB))
|
|
}
|
|
|
|
pub fn specs() -> Vec<CommandSpec> {
|
|
vec![
|
|
cmd!("help.docs", "EffectCraft Help...", [], Some("F1"), "{page?: help|scripting|expressions|effects|agents}", always, docs),
|
|
cmd!("help.discord", "Join the ArtCraft Discord...", ["Help"], None, "{}", always, |s, _| open(s, links::DISCORD.into())),
|
|
cmd!("help.website", "ArtCraft Website", ["Help"], None, "{}", always, |s, _| open(s, links::WEBSITE.into())),
|
|
cmd!("help.appPage", "EffectCraft Home Page", ["Help"], None, "{}", always, |s, _| open(s, links::APP_PAGE.into())),
|
|
cmd!("help.github", "EffectCraft on GitHub", ["Help"], None, "{}", always, |s, _| open(s, links::GITHUB.into())),
|
|
cmd!("help.reportIssue", "Provide Feedback...", ["Help"], None, "{}", always, |s, _| open(s, links::ISSUES.into())),
|
|
cmd!(
|
|
"help.sibling",
|
|
"Other ArtCraft Apps",
|
|
[],
|
|
None,
|
|
"{app: photocraft|drawcraft|filmcraft|lightcraft|printcraft|designcraft, kind?: page|github}",
|
|
always,
|
|
sibling
|
|
),
|
|
]
|
|
}
|