EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
engine: split layers above the original by default (#2083)
Madhav Agarwal7fe051389461
diff --git a/crates/engine/src/prefs.rs b/crates/engine/src/prefs.rsindex a2ce579ea..10f7418e7 100644--- a/crates/engine/src/prefs.rs+++ b/crates/engine/src/prefs.rs@@ -110,7 +110,8 @@ page!(General {/// Synchronize Time of All Related Items.sync_time_related_items: bool = true,expression_pick_whip_compact: bool = true,- create_split_layers_above: bool = false,+ /// Create Split Layers Above Original Layer (After Effects' default).+ create_split_layers_above: bool = true,use_system_color_picker: bool = false,/// Number of projects in File ▸ Open Recent.recent_items: u32 = 10,diff --git a/crates/engine/src/tests_m145.rs b/crates/engine/src/tests_m145.rsindex fe0a16936..68b897617 100644--- a/crates/engine/src/tests_m145.rs+++ b/crates/engine/src/tests_m145.rs@@ -42,14 +42,14 @@ fn split_layers_go_above_or_below_the_original() {let mut s = session();let a = solid(&mut s, "#ff0000");s.execute("time.set", json!({"time": 1.0})).unwrap();- let below = s.execute("edit.splitLayer", json!({"layers": [a]})).unwrap()[0].as_u64().unwrap();+ let above = s.execute("edit.splitLayer", json!({"layers": [a]})).unwrap()[0].as_u64().unwrap();let order: Vec<u64> = s.active_comp().unwrap().layers.iter().map(|l| l.id.0).collect();- assert_eq!(order, vec![a, below], "off (default): the new part goes below");+ assert_eq!(order, vec![above, a], "on (default): the new part goes above");s.execute("edit.undo", json!({})).unwrap();- s.execute("prefs.set", json!({"key": "general.createSplitLayersAbove", "value": true})).unwrap();- let above = s.execute("edit.splitLayer", json!({"layers": [a]})).unwrap()[0].as_u64().unwrap();+ s.execute("prefs.set", json!({"key": "general.createSplitLayersAbove", "value": false})).unwrap();+ let below = s.execute("edit.splitLayer", json!({"layers": [a]})).unwrap()[0].as_u64().unwrap();let order: Vec<u64> = s.active_comp().unwrap().layers.iter().map(|l| l.id.0).collect();- assert_eq!(order, vec![above, a]);+ assert_eq!(order, vec![a, below]);}#[test]diff --git a/docs/preferences.md b/docs/preferences.mdindex 8b86528a1..2c8f987ae 100644--- a/docs/preferences.md+++ b/docs/preferences.md@@ -91,7 +91,8 @@ Commands (CLI, MCP, control channel):one and in the comps that nest it (through the precomp layers' timing)- `general.expressionPickWhipCompact`: off, the pick whip writes match names(`thisComp.layer("A")("transform")("opacity")`)-- `general.createSplitLayersAbove`: where Edit ▸ Split Layer puts the new layer+- `general.createSplitLayersAbove`: where Edit ▸ Split Layer puts the new layer (on by default,+ as in After Effects)- `startup.showHomeOnOpenProject`: the Home screen comes up after File ▸ Open / Open Recent- `composition.motionPath`, `composition.motionPathSeconds`, `composition.motionPathKeyframes`:how much of a position motion path the viewer draws (all, none, N seconds or N keyframes