EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge pull request #1210 from arnav-hiwarkar/feat/copy-presets-folder-path
Brandon Thomasacb77a8c85e1
diff --cc crates/ui-egui/src/menus.rsindex ab2285b33,5edeef7db..8b5fd1c30--- a/crates/ui-egui/src/menus.rs+++ b/crates/ui-egui/src/menus.rs@@@ -282,15 -271,11 +282,18 @@@ fn no_params(p: &Value) -> boolp.as_object().is_none_or(|m| m.is_empty())}+/// `{"comp": id}` and nothing else: Composition Settings opens on that comp instead of+/// applying no settings to it.+fn only_comp(p: &Value) -> Option<effectcraft_engine::project::ItemId> {+ let m = p.as_object().filter(|m| m.len() == 1)?;+ m.get("comp")?.as_u64().map(effectcraft_engine::project::ItemId)+}+/// Execute a UI or engine command by id.pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: Value) -> Result<Value, String> {+ if id == "effects.copyPresetsFolderPath" {+ return frontend(app, ctx, id, params);+ }// Layer ▸ New ▸ Text (menu, shortcut, context menus) puts an insertion point in the centre of// the comp, as After Effects does, so typing goes into Source Text rather than running// shortcuts (#866). `engine.execute` keeps the headless default.