diff --git a/crates/engine/src/cmd/live/blend.rs b/crates/engine/src/cmd/live/blend.rs index a208d527fa..b09b476301 100644 --- a/crates/engine/src/cmd/live/blend.rs +++ b/crates/engine/src/cmd/live/blend.rs @@ -364,7 +364,19 @@ fn selected_spec(s: &Session) -> Option<(NodeId, BlendSpec, Vec)> { pub(super) fn blend_options(s: &mut Session, p: &Value) -> Result { const C: &str = "object.blend.options"; - let Some((_, cur, _)) = selected_spec(s) else { + let id = crate::cmd::object_param(p, "id", C)?; + let target = match id { + Some(id) => { + let doc = &s.doc()?.doc; + match doc.node(id).map(|n| &n.kind) { + Some(NodeKind::Blend { .. }) if !doc.is_editable(id) => return Err(bad(C, "the object is hidden or locked")), + Some(NodeKind::Blend { spec, children }) => Some((id, (**spec).clone(), children.iter().map(|c| c.id).collect())), + _ => return Err(bad(C, "not a blend")), + } + } + None => selected_spec(s), + }; + let Some((_, cur, _)) = target else { if ["easingType", "ramp", "colorShift"].iter().any(|key| p.get(*key).is_some_and(|v| !v.is_null())) { return Err(bad(C, "select a blend to set easing or color shift")); } @@ -374,19 +386,59 @@ pub(super) fn blend_options(s: &mut Session, p: &Value) -> Result { s.prefs.blend_options = Some(BlendDefaults { spacing, orientation: orientation_param(p, d.orientation), ..d }); return Ok(json!({ "defaults": true })); }; - if gives_easing(p) && any_without_spine(s) { + let no_spine = if id.is_some() { cur.no_spine } else { any_without_spine(s) }; + if gives_easing(p) && no_spine { return Err(bad(C, "the blend has no spine")); } - let spacing = spacing_param(p, C, cur.spacing)?; - let orientation = orientation_param(p, cur.orientation); + // Every value is checked before anything changes. Each blend then takes only the values that + // were given and keeps its own for the rest, so editing several blends does not copy the first + // one's options onto the others. + let given = |key: &str| p.get(key).is_some_and(|v| !v.is_null()); + spacing_param(p, C, cur.spacing)?; let ease = ease_param(p, C, cur.ease)?; let color_shift = percent_param(p, C, "colorShift", cur.color_shift, -100.0)?; - edit_blends(s, "Blend Options", |_, spec| { - spec.spacing = spacing; - spec.orientation = orientation; - spec.ease = ease; - spec.color_shift = color_shift; - }) + let (has_kind, has_ramp, has_shift) = (given("easingType"), given("ramp"), given("colorShift")); + let set = |spec: &mut BlendSpec| { + spec.spacing = spacing_param(p, C, spec.spacing).unwrap_or(spec.spacing); + spec.orientation = orientation_param(p, spec.orientation); + if has_kind { + spec.ease.kind = ease.kind; + } + if has_ramp { + spec.ease.ramp = ease.ramp; + } + if has_shift { + spec.color_shift = color_shift; + } + }; + let targets = match id { + Some(id) => vec![id], + None => selected_of(s, is_blend), + }; + let doc = &s.doc()?.doc; + let changes = |b: &NodeId| match doc.node(*b).map(|n| &n.kind) { + Some(NodeKind::Blend { spec, .. }) => { + let mut next = (**spec).clone(); + set(&mut next); + next != **spec + } + _ => false, + }; + if !targets.iter().any(changes) { + return ok(); + } + match id { + Some(id) => { + s.edit("Blend Options", |d, _| { + if let Some(NodeKind::Blend { spec, .. }) = d.node_mut(id).map(|n| &mut n.kind) { + set(spec); + } + Ok(()) + })?; + ok() + } + None => edit_blends(s, "Blend Options", |_, spec| set(spec)), + } } pub(super) fn blend_set_easing(s: &mut Session, p: &Value) -> Result { diff --git a/crates/engine/src/cmd/live/commands.rs b/crates/engine/src/cmd/live/commands.rs index 692ce9e563..79b2915aa0 100644 --- a/crates/engine/src/cmd/live/commands.rs +++ b/crates/engine/src/cmd/live/commands.rs @@ -36,7 +36,7 @@ pub fn specs() -> Vec { "Blend Options…", ["Object", "Blend"], None, - "{spacing?: smooth|steps|distance, value?: n, steps?: n, distance?: pt, orientation?: page|path, smooth?: bool, easingType?: easeIn|easeOut|easeInOut|easeOutIn, ramp?: pct, colorShift?: pct} set the options of the selected blends; easingType chooses the distribution, ramp sets its strength (0..100; 0 = even), colorShift (-100..100; 0 = even) shifts colours independently of shape/position easing (omitted ones keep their value; out of range is an error); with no blend selected, the options new blends start with (spacing and orientation only; a tool setting, not an undo step) → {defaults?: true}", + "{id?: id, spacing?: smooth|steps|distance, value?: n, steps?: n, distance?: pt, orientation?: page|path, smooth?: bool, easingType?: easeIn|easeOut|easeInOut|easeOutIn, ramp?: pct, colorShift?: pct} set the options of the selected blends (or of the blend `id` alone; a hidden or locked one is an error); easingType chooses the distribution, ramp sets its strength (0..100; 0 = even), colorShift (-100..100; 0 = even) shifts colours independently of shape/position easing (each blend keeps its own value for every option omitted; out of range is an error and changes nothing; no undo step when nothing changes); with no blend selected and no `id`, the options new blends start with (spacing and orientation only; a tool setting, not an undo step) → {defaults?: true}", always, blend_options ), diff --git a/crates/engine/src/tests/blendopts.rs b/crates/engine/src/tests/blendopts.rs index 05fbf1a72e..576dce5b68 100644 --- a/crates/engine/src/tests/blendopts.rs +++ b/crates/engine/src/tests/blendopts.rs @@ -772,3 +772,122 @@ fn whether_a_blend_has_a_spine_is_saved_and_old_blends_have_one() { assert!(!v.no_spine, "{odd}"); } } + +fn undo_len(s: &Session) -> usize { + s.doc().unwrap().history.undo.len() +} + +/// Two blends with different options, both selected: the first (Steps 3, along the path, Ease +/// Out at 20%, Shift 10%) and the second (Distance 12 pt, along the page, Ease In Out at 60%, +/// Shift -40%). +fn two_different_blends(s: &mut Session) -> (NodeId, NodeId) { + let b1 = make(s, 0.0, json!({"spacing": "steps", "orientation": "path"})); + let b2 = make(s, 100.0, json!({"spacing": "distance", "value": 12, "orientation": "path"})); + s.execute("object.blend.setEasing", &json!({"id": b1.0, "easingType": "easeOut", "ramp": 20, "colorShift": 10})).unwrap(); + s.execute("object.blend.setEasing", &json!({"id": b2.0, "easingType": "easeInOut", "ramp": 60, "colorShift": -40})).unwrap(); + sel(s, &[b2]); + s.execute("object.blend.options", &json!({"orientation": "page"})).unwrap(); + sel(s, &[b1, b2]); + (b1, b2) +} + +#[test] +fn options_on_several_blends_set_only_the_values_given() { + let mut s = session(); + let (b1, b2) = two_different_blends(&mut s); + let (before1, before2) = (spec(&s, b1).1, spec(&s, b2).1); + assert_ne!(before1.spacing, before2.spacing); + // Each value given goes to every selected blend; each keeps its own for the others. + for (p, apply) in [ + (json!({"colorShift": 30}), (|sp: &mut BlendSpec| sp.color_shift = 30.0) as fn(&mut BlendSpec)), + (json!({"ramp": 45}), |sp| sp.ease.ramp = 0.45), + (json!({"easingType": "easeOutIn"}), |sp| sp.ease.kind = vectorcraft_doc::BlendEaseType::OutIn), + (json!({"orientation": "path"}), |sp| sp.orientation = BlendOrientation::AlignToPath), + (json!({"spacing": "steps", "value": 7}), |sp| sp.spacing = BlendSpacing::Steps(7)), + ] { + let (mut want1, mut want2) = (spec(&s, b1).1, spec(&s, b2).1); + apply(&mut want1); + apply(&mut want2); + s.execute("object.blend.options", &p).unwrap(); + assert_eq!((spec(&s, b1).1, spec(&s, b2).1), (want1, want2), "{p}"); + } + // The whole edit of both blends is one undo step. + let depth = undo_len(&s); + s.execute("object.blend.options", &json!({"colorShift": -5, "ramp": 5})).unwrap(); + assert_eq!(undo_len(&s), depth + 1); + s.execute("edit.undo", &json!({})).unwrap(); + assert_eq!((spec(&s, b1).1.color_shift, spec(&s, b2).1.color_shift), (30.0, 30.0)); +} + +#[test] +fn options_with_an_id_edit_that_blend_alone() { + let mut s = session(); + let (b1, b2) = two_different_blends(&mut s); + let before2 = spec(&s, b2).1; + let mut want1 = spec(&s, b1).1; + s.execute("object.blend.options", &json!({"id": b1.0, "spacing": "distance", "value": 15, "ramp": 50, "colorShift": -20})).unwrap(); + want1.spacing = BlendSpacing::Distance(15.0); + want1.ease.ramp = 0.5; + want1.color_shift = -20.0; + assert_eq!(spec(&s, b1).1, want1, "only the values given change"); + assert_eq!(spec(&s, b2).1, before2, "a selected blend that is not `id` stays as it was"); + // `id` works with nothing selected, and does not set the options new blends start with. + s.execute("select.none", &json!({})).unwrap(); + let defaults = s.execute("object.blend.info", &json!({})).unwrap(); + s.execute("object.blend.options", &json!({"id": b2.0, "orientation": "path"})).unwrap(); + assert_eq!(spec(&s, b2).1.orientation, BlendOrientation::AlignToPath); + assert_eq!(s.execute("object.blend.info", &json!({})).unwrap(), defaults); + // A hidden or locked blend and an object that is not a blend are errors that change nothing. + for (visible, locked) in [(false, false), (true, true)] { + s.edit("state", |d, _| { + let n = d.node_mut(b1).unwrap(); + (n.visible, n.locked) = (visible, locked); + Ok(()) + }) + .unwrap(); + let (before, depth) = (spec(&s, b1).1, undo_len(&s)); + let error = s.execute("object.blend.options", &json!({"id": b1.0, "colorShift": 25})).unwrap_err().to_string(); + assert!(error.contains("the object is hidden or locked"), "{error}"); + assert_eq!((spec(&s, b1).1, undo_len(&s)), (before, depth)); + } + let other = rect(&mut s, 300.0, 0.0, 10.0); + for id in [json!(other.0), json!(999_999)] { + let error = s.execute("object.blend.options", &json!({"id": id, "colorShift": 25})).unwrap_err().to_string(); + assert!(error.contains("not a blend"), "{error}"); + } + // The blend's own spine decides whether easing is allowed, whatever is selected. + s.execute("object.blend.createSpine", &json!({"mode": "never"})).unwrap(); + let bare = make(&mut s, 300.0, json!({})); + sel(&mut s, &[b2]); + let error = s.execute("object.blend.options", &json!({"id": bare.0, "ramp": 30})).unwrap_err().to_string(); + assert!(error.contains("the blend has no spine"), "{error}"); + s.execute("object.blend.options", &json!({"id": b2.0, "ramp": 30})).unwrap(); + assert_eq!(spec(&s, b2).1.ease.ramp, 0.3); +} + +#[test] +fn options_that_change_nothing_or_are_refused_record_no_undo_step() { + let mut s = session(); + let (b1, b2) = two_different_blends(&mut s); + let before = (spec(&s, b1).1, spec(&s, b2).1); + let depth = undo_len(&s); + // Values the blends already have, and no values at all. + for p in [json!({}), json!({"orientation": "page", "id": b2.0}), json!({"colorShift": 10, "id": b1.0})] { + s.execute("object.blend.options", &p).unwrap(); + assert_eq!(undo_len(&s), depth, "{p}"); + } + // An invalid value anywhere stops the whole call before anything changes. + for p in [ + json!({"colorShift": 50, "ramp": 101}), + json!({"colorShift": 50, "ramp": -1}), + json!({"colorShift": 50, "ramp": "half"}), + json!({"ramp": 50, "colorShift": -101}), + json!({"ramp": 50, "easingType": "linear"}), + json!({"ramp": 50, "spacing": "steps", "value": 0}), + json!({"ramp": 50, "spacing": "distance", "value": -3}), + json!({"ramp": 50, "id": "b1"}), + ] { + assert!(s.execute("object.blend.options", &p).is_err(), "{p}"); + assert_eq!((spec(&s, b1).1, spec(&s, b2).1, undo_len(&s)), (before.0.clone(), before.1.clone(), depth), "{p}"); + } +} diff --git a/crates/ui-egui/src/panels/blend.rs b/crates/ui-egui/src/panels/blend.rs index a41c2946c7..64d936119a 100644 --- a/crates/ui-egui/src/panels/blend.rs +++ b/crates/ui-egui/src/panels/blend.rs @@ -16,7 +16,7 @@ use vectorcraft_doc::live::BlendSpineMode; use super::selection_len; use crate::VectorcraftApp; use crate::dialogs::blend_options::{SPACING, orientation_button}; -use crate::widgets; +use crate::widgets::{self, Live}; pub const ID: &str = "blend"; @@ -66,6 +66,22 @@ fn spacing_params(mode: &str, steps: f64, distance: f64) -> Value { } } +/// The Ramp or Shift slider: `key` of `object.blend.options` as a percentage from `min` to 100. +/// A drag previews the selected blends and its release records one undo step; a click on the +/// rail or an arrow key records one at once. +fn percent_slider(app: &mut VectorcraftApp, ui: &mut Ui, key: &str, value: Option, min: f64) { + let mut v = value.unwrap_or(0.0).clamp(min, 100.0); + let resp = widgets::slider(ui, egui::Slider::new(&mut v, min..=100.0).suffix("%")); + let phase = if resp.drag_stopped() || (resp.changed() && !resp.dragged()) { + Live::Released + } else if resp.changed() { + Live::Dragging + } else { + return; + }; + crate::panels::live_run(app, "Blend Options", "object.blend.options", json!({ key: v }), phase); +} + /// Spacing and Orientation, as `object.blend.info` reports them; a change runs /// `object.blend.options`. fn settings(app: &mut VectorcraftApp, ui: &mut Ui) { @@ -122,20 +138,10 @@ fn settings(app: &mut VectorcraftApp, ui: &mut Ui) { change = Some(json!({"easingType": mode})); } }); - widgets::label_row(ui, tl!("Ramp:"), LABEL_W, |ui| { - let mut ramp = info["ramp"].as_f64().unwrap_or(0.0); - if ui.add(egui::Slider::new(&mut ramp, 0.0..=100.0).suffix("%")).changed() { - change = Some(json!({"ramp": ramp})); - } - }); + widgets::label_row(ui, tl!("Ramp:"), LABEL_W, |ui| percent_slider(app, ui, "ramp", info["ramp"].as_f64(), 0.0)); }); ui.add_enabled_ui(selected, |ui| { - widgets::label_row(ui, tl!("Shift:"), LABEL_W, |ui| { - let mut shift = info["colorShift"].as_f64().unwrap_or(0.0); - if ui.add(egui::Slider::new(&mut shift, -100.0..=100.0).suffix("%")).changed() { - change = Some(json!({"colorShift": shift})); - } - }); + widgets::label_row(ui, tl!("Shift:"), LABEL_W, |ui| percent_slider(app, ui, "colorShift", info["colorShift"].as_f64(), -100.0)); }); if let Some(p) = change { app.run("object.blend.options", p).ok(); diff --git a/crates/ui-egui/src/panels/tests_blend.rs b/crates/ui-egui/src/panels/tests_blend.rs index 46521d3a65..7b5d081efc 100644 --- a/crates/ui-egui/src/panels/tests_blend.rs +++ b/crates/ui-egui/src/panels/tests_blend.rs @@ -5,7 +5,7 @@ //! `object.blend.options`, and each other button runs its Object › Blend command. use egui::{Event, Pos2, Rect, pos2, vec2}; -use serde_json::json; +use serde_json::{Value, json}; use vectorcraft_doc::live::{BlendOrientation, BlendSpacing}; use vectorcraft_doc::{BlendSpec, NodeId, NodeKind}; use vectorcraft_engine::Session; @@ -78,6 +78,31 @@ impl Frames { self.run(app, vec![]); } + /// Press at `from`, move to `to` in four steps, a frame each, and release there. + fn drag(&mut self, app: &mut VectorcraftApp, from: Pos2, to: Pos2) { + let button = |pos, pressed| Event::PointerButton { pos, button: egui::PointerButton::Primary, pressed, modifiers: egui::Modifiers::NONE }; + self.run(app, vec![Event::PointerMoved(from)]); + self.run(app, vec![button(from, true)]); + for i in 1..=4 { + self.run(app, vec![Event::PointerMoved(from + (to - from) * (i as f32 / 4.0))]); + } + self.run(app, vec![button(to, false)]); + self.run(app, vec![]); + } + + /// The Ramp (`index` 0) or Shift (1) slider's rail: its left and right ends at mid-height. + fn slider(&mut self, app: &mut VectorcraftApp, index: usize) -> (Pos2, Pos2) { + self.run(app, vec![]); + let out = self.run(app, vec![]); + let nodes = &out.platform_output.accesskit_update.as_ref().expect("an accessibility tree").nodes; + let mut sliders: Vec<_> = nodes.iter().filter(|(_, n)| n.role() == egui::accesskit::Role::Slider).collect(); + // The tree is not in layout order: Ramp sits above Shift. + sliders.sort_by(|a, b| a.1.bounds().unwrap().y0.total_cmp(&b.1.bounds().unwrap().y0)); + let b = sliders[index].1.bounds().expect("bounds"); + let y = ((b.y0 + b.y1) * 0.5) as f32; + (pos2(b.x0 as f32, y), pos2(b.x1 as f32, y)) + } + /// Click the text `label` the panel draws. fn click_text(&mut self, app: &mut VectorcraftApp, label: &str) { let at = self.text(app, label); @@ -309,3 +334,70 @@ fn panel_easing_type_ramp_and_shift_edit_the_blend_and_undo() { let text = crate::tests_labels::painted_text(&mut app, |app, ui| crate::dialogs::show(app, ui.ctx())); assert!(!text.contains("Ease In:") && !text.contains("Ramp:") && !text.contains("Color Ease"), "{text}"); } + +#[test] +fn a_ramp_or_shift_drag_is_one_undo_step() { + let mut app = app(); + let id = NodeId(app.run("object.blend.make", json!({"smooth": true, "orientation": "path"})).unwrap()["id"].as_u64().unwrap()); + let mut f = Frames::new(); + for index in [0, 1] { + let (left, right) = f.slider(&mut app, index); + let (before, depth) = (spec(&app, id), undo_depth(&app)); + f.drag(&mut app, left + (right - left) * 0.6, left + (right - left) * 0.9); + let after = spec(&app, id); + assert!(!app.session.in_interaction(), "the release ends the drag"); + if index == 0 { + assert!(after.ease.ramp > before.ease.ramp, "{after:?}"); + } else { + assert!(after.color_shift > before.color_shift, "{after:?}"); + } + assert_eq!(undo_depth(&app), depth + 1, "the whole drag is one undo step"); + app.run("edit.undo", json!({})).unwrap(); + assert_eq!(spec(&app, id), before); + } +} + +#[test] +fn ramp_and_shift_edit_every_selected_blend_and_keep_their_other_options() { + let mut app = app(); + let a = NodeId(app.run("object.blend.make", json!({"spacing": "steps", "steps": 3, "orientation": "path"})).unwrap()["id"].as_u64().unwrap()); + let ids: Vec = + [0, 200].map(|x| app.run("shape.rectangle", json!({"x": x, "y": 100, "width": 20, "height": 20})).unwrap()["id"].clone()).into(); + app.run("select.set", json!({"ids": ids})).unwrap(); + let b = + NodeId(app.run("object.blend.make", json!({"spacing": "distance", "distance": 12, "orientation": "path"})).unwrap()["id"].as_u64().unwrap()); + app.run("object.blend.setEasing", json!({"id": b.0, "easingType": "easeInOut", "colorShift": -40})).unwrap(); + app.run("select.set", json!({"ids": [a.0, b.0]})).unwrap(); + let mut f = Frames::new(); + for index in [0, 1] { + let (left, right) = f.slider(&mut app, index); + let (before_a, before_b, depth) = (spec(&app, a), spec(&app, b), undo_depth(&app)); + f.click(&mut app, left + (right - left) * 0.75); + let (after_a, after_b) = (spec(&app, a), spec(&app, b)); + assert_eq!(undo_depth(&app), depth + 1, "one undo step for both blends"); + // The value the slider set goes to both; each keeps its own spacing, type and the other value. + if index == 0 { + assert!(after_a.ease.ramp > 0.0 && after_a.ease.ramp == after_b.ease.ramp, "{after_a:?} {after_b:?}"); + assert_eq!((after_a.color_shift, after_b.color_shift), (before_a.color_shift, before_b.color_shift)); + } else { + assert!(after_a.color_shift > 0.0 && after_a.color_shift == after_b.color_shift, "{after_a:?} {after_b:?}"); + assert_eq!((after_a.ease.ramp, after_b.ease.ramp), (before_a.ease.ramp, before_b.ease.ramp)); + } + assert_eq!((after_a.spacing, after_b.spacing), (BlendSpacing::Steps(3), BlendSpacing::Distance(12.0))); + assert_eq!((after_a.ease.kind, after_b.ease.kind), (before_a.ease.kind, before_b.ease.kind)); + } +} + +#[test] +fn fractional_ramp_and_shift_stay_as_they_are_while_the_panel_draws() { + let mut app = app(); + let id = NodeId(app.run("object.blend.make", json!({"smooth": true, "orientation": "path"})).unwrap()["id"].as_u64().unwrap()); + app.run("object.blend.options", json!({"id": id.0, "ramp": 42.5, "colorShift": 12.5})).unwrap(); + let depth = undo_depth(&app); + let mut f = Frames::new(); + f.run(&mut app, vec![]); + f.run(&mut app, vec![]); + let info = app.session.execute("object.blend.info", &json!({})).unwrap(); + assert_eq!((&info["ramp"], &info["colorShift"]), (&json!(42.5), &json!(12.5))); + assert_eq!(undo_depth(&app), depth); +} diff --git a/docs/mcp.md b/docs/mcp.md index bee07110e6..e723c5ea3b 100644 --- a/docs/mcp.md +++ b/docs/mcp.md @@ -11811,6 +11811,14 @@ so its point at `t` moves by (dx, dy), turning a straight spine into a curve (`p {"name":"run_command","arguments":{"command":"object.blend.spine.moveAnchor","params":{"id":40,"anchor":1,"x":150,"y":20}}} ``` +`object.blend.options {id?, spacing?, value?, steps?, distance?, orientation?, smooth?, easingType?, ramp?, colorShift?}` +sets the options of every selected blend, or of the blend `id` alone. Each blend takes only the options given and +keeps its own value for the others, so a call with `colorShift` alone leaves each blend's spacing, orientation, type +and ramp as they were. A hidden or locked `id`, an `id` that is not a blend and a value out of range are errors that +change nothing, and a call that changes no blend records no undo step. With no blend selected and no `id`, the call +sets the spacing and orientation new blends start with. The Blend panel's Ramp and Shift sliders run it on the +selected blends: a drag previews and its release records one undo step. + `object.blend.setEasing {id?, easingType?, ramp?, colorShift?}` sets one blend's easing and color shift (the first selected blend without `id`) and returns `{id, easingType, ramp, colorShift, changed}`; omitted values are kept. `easingType` is `easeIn`, `easeOut`, `easeInOut` or `easeOutIn`, `ramp` is 0 to 100 and `colorShift` -100 to 100. diff --git a/docs/target-app-parity.md b/docs/target-app-parity.md index f506da06e1..3d5ed5a5ac 100644 --- a/docs/target-app-parity.md +++ b/docs/target-app-parity.md @@ -1666,6 +1666,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur When the object the Blend tool picked first is deleted or undone away before the second click, the next click on an object picks that object first instead of doing nothing. Regression tests: `blend_tool_picks_again_when_its_first_pick_is_gone` in `meshblend.rs` and `the_blend_tool_picks_again_when_its_first_pick_is_deleted` in `tests/blendopts.rs`. Window › Blend opens the Blend panel: Make, the selected blend's Spacing and Orientation (with no blend selected, the options new blends start with), Reverse Front to Back, Reverse Spine, Replace Spine, Expand and Release, each running its Object › Blend command. Make is dimmed until two or more objects are selected. Spacing and Orientation are dimmed until a blend or two or more objects are selected, and the other buttons are dimmed until a blend is selected. The Blend panel's Create Spine menu (Auto, Always, Never; `object.blend.createSpine`) sets whether new blends get a spine, from the Blend tool, Make and `object.blend.make` alike ([Blend panel overview](https://helpx.adobe.com/illustrator/desktop/manage-colors/apply-transparency-and-blending/blend-panel-overview.html)). Auto and Always give every new blend a straight spine, as before; Never makes blends without one, which keep their steps on the straight lines between the keys, have Type and Ramp dimmed, refuse Reverse Spine and spine edits, release without a spine path, and get a spine from Replace Spine. The setting is kept with the preferences and leaves blends already made as they are; Auto as the starting value and keeping the setting across sessions are VectorCraft's own rules. Builds on #5177 by adambelis. Evidence: `tests::blendopts::{create_spine_sets_whether_new_blends_get_a_spine, a_blend_without_a_spine_has_none_to_edit_reverse_ease_or_release, whether_a_blend_has_a_spine_is_saved_and_old_blends_have_one}` and `panels::tests_blend::create_spine_sets_what_new_blends_get_whatever_is_selected`. + Blend Options on several selected blends (the Blend panel's Type, Ramp and Shift, and `object.blend.options`) sets only the values given, and each blend keeps its own spacing, orientation, type, ramp and shift for the rest instead of taking the first blend's. `object.blend.options {id}` edits that blend alone; a hidden or locked blend, an object that is not a blend and a value out of range are errors that change nothing, and a call that changes nothing records no undo step. A drag of the panel's Ramp or Shift slider previews on the canvas and records one undo step on release. Builds on #8022 by ruchirguitar. Evidence: `tests::blendopts::{options_on_several_blends_set_only_the_values_given, options_with_an_id_edit_that_blend_alone, options_that_change_nothing_or_are_refused_record_no_undo_step}` and `panels::tests_blend::{a_ramp_or_shift_drag_is_one_undo_step, ramp_and_shift_edit_every_selected_blend_and_keep_their_other_options, fractional_ramp_and_shift_stay_as_they_are_while_the_panel_draws}`. With the Blend tool, Escape drops the object clicked first and stops the next click adding to the blend just made, so the next click picks a new first object; the document and the selection stay as they are. Regression tests: `escape_drops_the_blend_tools_first_pick` in `meshblend.rs` and `tests/blendopts.rs`. Objects on Path (#2545): a click with the Objects on Path tool (in Edit Toolbar's Modify section and the Blend tool's flyout; Object › Objects on Path › Attach and the context menu with two or more objects selected choose it) attaches the selected objects to the path clicked, open or closed, in an Objects on Path group with the path at its bottom. The objects go along the path column by column from left to right, spread evenly from its first anchor (the last one sits on the end of an open path), each turned to the path at its attachment point; Pivot and Rotate set where each one attaches and how far it tilts (`object.objectsOnPath.attach`, `object.objectsOnPath.options`), and with Objects on Path groups selected the Properties panel's Objects on Path Options section shows them as a nine-point Pivot grid and a Rotate field with common angles, each change one undo step for every selected group. Editing the path moves the objects, an object moved on its own goes back, objects moved into or out of the group in the Layers panel join or leave the path, and Object › Objects on Path › Expand leaves a plain group. The group saves and reopens live and exports as plain art. With one Objects on Path group selected, the Selection and Objects on Path tools show the Rotate All widget beside its first object: dragging it turns every object about its attachment point by the angle the pointer turns, adding it to the group's Rotate in one undo step, in 15° steps with Shift ([Objects on Path](https://helpx.adobe.com/illustrator/using/objects-on-path.html)). Detach is in its own entry below. Objects on Path Space widget: with one Objects on Path group of two or more objects selected, the Selection and Objects on Path tools show a square handle beyond its last object; dragging it along the path, round its bends, sets the distance between the objects' attachment points in one undo step, the first object staying where it is, and with Alt (Option on macOS) the objects spread from both ends toward the center; the distance shows next to the pointer during the drag, in the document's units ([Rearrange and edit objects on a path](https://helpx.adobe.com/illustrator/desktop/manage-objects/arrange-objects/rearrange-and-edit-objects-on-a-path.html), [Objects on Path](https://helpx.adobe.com/illustrator/using/objects-on-path.html)). The group keeps the distance (`object.objectsOnPath.options {spacing, start}`) through Pivot and Rotate changes, path edits, copies, saving and reopening, and scales it with the group; by default (`"auto"`) the objects are spread evenly as before. Evidence: `objects_on_path::tests::{space_sets_the_distance_between_the_stops, space_on_a_closed_path_wraps_at_the_first_anchor_and_stops_short_of_the_first_object}` in `crates/doc`, `tests::objects_on_path::space_sets_the_distance_between_the_objects_in_one_undo_step` in `crates/engine`, `objects_on_path::tests::dragging_the_space_widget_spaces_the_objects_from_the_first_one` in `crates/tools`.