graphic design tool
git clone https://git.lucas.co/cce-designer.git
feat: Show Camera Pivot is a row of the viewport menu
The pivot marker was reachable from the Guides menubar and the palette
only; it sits with the grid and the origin in the right-click menu now.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
CLAUDE.md | 4 +++-
src/app.rs | 1 +
src/main.rs | 23 ++++++++++++++++++++++-
3 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/CLAUDE.md b/CLAUDE.md
index 7e9ef62..2d12c94 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -2179,7 +2179,9 @@ multi-selection, so taking `Shift+L` now would have to be given back later.
The viewport's right-click menu has two SUBMENUS (since 2026-09-29;
until then it was one list of some twenty rows). The menu itself holds
-what is done — Frame All, View 1:1 — the guides (Show Grid, Show Origin;
+what is done — Frame All, View 1:1 — the guides (Show Grid, Show Origin,
+and since 2026-09-29 Show Camera Pivot, which until then was in the Guides
+menubar and the palette only;
the reference CUBE guide was removed on 2026-09-25 — its command, mesh,
RT-scene copy, settings field and menubar item, with the Guides menubar
addressed through `GUIDES_MENU` / `GUIDE_*` so no item slid onto another's
diff --git a/src/app.rs b/src/app.rs
index 05c2e74..8fb05e2 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -5373,6 +5373,7 @@ impl State {
row(&mut options, &mut actions, "-".into(), sep);
toggle(&mut options, &mut actions, "toggle_grid");
toggle(&mut options, &mut actions, "toggle_origin");
+ toggle(&mut options, &mut actions, "toggle_camera_pivot");
// The display settings, a submenu each; the menu marks the rows.
row(&mut options, &mut actions, "-".into(), sep);
diff --git a/src/main.rs b/src/main.rs
index 299e9a3..31babdb 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -2072,7 +2072,7 @@ mod tests {
groups(None),
vec![
vec![A::FrameAll, A::OneToOne],
- vec![A::Command("toggle_grid"), A::Command("toggle_origin")],
+ vec![A::Command("toggle_grid"), A::Command("toggle_origin"), A::Command("toggle_camera_pivot")],
vec![A::Submenu(P::Style), A::Submenu(P::Markers)],
]
);
@@ -2338,6 +2338,27 @@ mod tests {
assert!(crate::app::DesignSettings::from_kdl_str(&kdl).viewport.show_point_numbers, "persisted");
}
+ /// Show Camera Pivot is a guide row of the menu itself, beside the
+ /// grid and the origin, marked from the live flag; the row runs the
+ /// command the Guides menubar and the palette run.
+ #[test]
+ fn the_viewport_menu_toggles_the_camera_pivot_marker() {
+ use crate::app::ViewportMenuAction as A;
+ let mut state = State::new(false);
+ state.viewport_mut().show_camera_pivot = false;
+ let row = |state: &State| {
+ let (options, actions) = state.viewport_menu_rows_of(None);
+ let i = actions.iter().position(|a| *a == A::Command("toggle_camera_pivot")).expect("a Show Camera Pivot row");
+ options[i].clone()
+ };
+ assert_eq!(row(&state), "○ Show Camera Pivot");
+ state.run_viewport_menu_action(A::Command("toggle_camera_pivot"));
+ assert!(state.viewport().show_camera_pivot);
+ assert_eq!(row(&state), "● Show Camera Pivot");
+ let kdl = fs::read_to_string(crate::app::DesignSettings::file_path()).expect("saved");
+ assert!(crate::app::DesignSettings::from_kdl_str(&kdl).viewport.show_camera_pivot_enabled, "persisted");
+ }
+
/// Show Point Markers is a switch in the Points group, over its own
/// size slider, marked from the live flag; the row runs the command,
/// which rebuilds the overlay (and keeps the positions the size slider