diff --git a/crates/engine/src/cmds_layer.rs b/crates/engine/src/cmds_layer.rs index 1aec4832..12e53ef1 100644 --- a/crates/engine/src/cmds_layer.rs +++ b/crates/engine/src/cmds_layer.rs @@ -54,7 +54,7 @@ pub fn specs() -> Vec { "Layer Properties", "Modify/Timeline", None, - "{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the first layer's properties and `layers`, the layers set. A layer's effects are layer.set_effects", + "{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the layer's properties (several layers: the first one's, and `layers`, the layers set). A layer's effects are layer.set_effects", true, set_properties, ), @@ -229,7 +229,10 @@ fn set_properties(s: &mut Session, p: &Value) -> Result { } let first = ids.first().copied().ok_or_else(|| EngineError::State("no layer to set".into()))?; let mut out = properties(s, first)?; - out["layers"] = json!(ids.iter().map(|l| l.0).collect::>()); + // One layer answers as it always has; several also say which were set. + if several { + out["layers"] = json!(ids.iter().map(|l| l.0).collect::>()); + } Ok(out) } diff --git a/docs/guide/reference/commands.md b/docs/guide/reference/commands.md index 376a7c07..03bcccef 100644 --- a/docs/guide/reference/commands.md +++ b/docs/guide/reference/commands.md @@ -171,7 +171,7 @@ This page is generated from the command registry, so it always matches the versi - **Mask** `layer.toggle_mask` · Modify › Timeline · changes the document Parameters: `{layer?} turns the layer into a mask over the layer below, or back into a normal layer. A new mask is locked: unlocked, its edge shows on the stage in the layer colour, to pick and reshape it` - **Layer Properties** `layer.set_properties` · Modify › Timeline · changes the document - Parameters: ``{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the first layer's properties and `layers`, the layers set. A layer's effects are layer.set_effects`` + Parameters: ``{layer? | layers?: [ids] (default: every layer selected in the layer list), name? (one layer only), type?: normal|mask|masked|guide|guided, mask?: coverage|alpha|luminance (a mask layer's mask type), color?, outline?: bool (view as outlines), height?: 100|200|300, opacity?: 0..100 (percent), visible?, locked?, onion?} sets several at once, on every one of the layers, as one undo step; answers with the layer's properties (several layers: the first one's, and `layers`, the layers set). A layer's effects are layer.set_effects`` - **Remove Camera** `camera.remove` · Modify › Timeline · changes the document Parameters: `{} (removes the camera layer and its moves; asks first when the camera is animated)` - **Remove Parent** `layer.remove_parent` · Modify › Timeline · changes the document diff --git a/docs/guide/symbols-and-library.md b/docs/guide/symbols-and-library.md index 0b671a9f..f54ef3fe 100644 --- a/docs/guide/symbols-and-library.md +++ b/docs/guide/symbols-and-library.md @@ -134,7 +134,7 @@ instance starts on has a heavier border and a filled caption. * **All frames** or **Keyframes only**: a symbol drawn with one pose per keyframe shows one picture per pose with Keyframes only. A dot marks the frames where a keyframe starts, and a frame's label shows beside its number. -* **Pictures** or **List**, and **Size** for the pictures. +* **Pictures** or **List**, and a slider for the size of the pictures. * **Pin** keeps the panel on this symbol when you select something else. A pick then goes to that symbol's instance at the playhead. diff --git a/src/frame_picker.rs b/src/frame_picker.rs index b9c11263..b285e39c 100644 --- a/src/frame_picker.rs +++ b/src/frame_picker.rs @@ -242,6 +242,9 @@ pub fn panel(app: &mut App, ui: &mut egui::Ui) { .on_hover_text(tr!("Single frame holds the chosen frame; Loop and Play once play on from it")) .set_name(tr!("Looping of the selected instance")); } + }); + // (A row of its own: it fits the narrowest dock.) + ui.horizontal_wrapped(|ui| { crate::theme::checkbox(ui, &mut app.frame_picker.create_keyframe, tr!("Create keyframe")).on_hover_text(tr!("A pick makes a keyframe at the playhead first, so the frames before keep what they showed (lip-sync, pose to pose)")); }); @@ -269,7 +272,8 @@ pub fn panel(app: &mut App, ui: &mut egui::Ui) { }); if app.frame_picker.view == View::Thumbnails { ui.horizontal(|ui| { - ui.label(tr!("Size")); + // The bar gives way to its number in a narrow dock. + ui.spacing_mut().slider_width = (ui.available_width() - 96.0).clamp(24.0, 140.0); a11y::slider(ui, &mut app.frame_picker.size, SIZE, tr!("Picture size"), a11y::SliderLook { suffix: " px", max_decimals: Some(0), ..Default::default() }).on_hover_text(tr!("Smaller pictures fit more frames in view")); }); }