Feat: viewport display lock, extended properties, VPLAYER and VPORTS commands

- Enforce status.locked in pan_active_viewport and zoom_active_viewport:
  locked viewports now reject pan/zoom inputs entirely
- Add perspective, render_mode, shade_plot_mode, hide_plot, ucs_icon_visible
  fields to the viewport property panel with appropriate pickers/toggles
- Add VPORTS command: lists all user viewports in the current layout
  (id, size, position, scale, on/locked state) in the command line
- Add VPLAYER command: per-viewport layer freeze/thaw from the command line
  (F <layer> to freeze, T <layer> to thaw, Enter to exit)
- Add CmdResult::VpLayerUpdate variant and its handler in apply_cmd_result

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Sonnet 4.6 committed 2026-03-31 23:52:18 +03:00
1 parent b013619c25
commit 73b224c191
7 files changed
+311 -1

No files matched your search

+2
View File
@@ -767,6 +767,7 @@ impl Scene {
if let Some(acadrust::EntityType::Viewport(vp)) =
self.document.get_entity_mut(vp_handle)
{
if vp.status.locked { return; }
let scale = if vp.custom_scale.abs() > 1e-9 {
vp.custom_scale
} else if vp.view_height.abs() > 1e-9 {
@@ -796,6 +797,7 @@ impl Scene {
if let Some(acadrust::EntityType::Viewport(vp)) =
self.document.get_entity_mut(vp_handle)
{
if vp.status.locked { return; }
// Zoom in = shrink view_height → higher scale → objects appear larger.
let factor = (1.0_f64 - 0.15 * steps as f64).clamp(0.1, 10.0);