Feat: Phase 1.5 — viewport count in status bar + REVCLOUD command

Status bar: shows "N VP" pill (with tooltip) when in a paper layout that has
user viewports (id > 1). New Scene::viewport_count() method.

REVCLOUD: closed LwPolyline with arc bumps (bulge = 0.5) along each edge.
Click polygon corners, Enter to close into a revision cloud shape.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Hakan Seven 2026-04-02 23:52:35 +03:00
commit 1572d0c38f
3 changed files with 34 additions and 1 deletions

View file

@ -228,6 +228,24 @@ impl Scene {
})
}
/// Count of user viewports (id > 1) in the current layout.
pub fn viewport_count(&self) -> usize {
if self.current_layout == "Model" {
return 0;
}
let layout_block = self.current_layout_block_handle();
if layout_block.is_null() {
return 0;
}
self.document.entities().filter(|e| {
if let EntityType::Viewport(vp) = e {
vp.id > 1 && vp.common.owner_handle == layout_block
} else {
false
}
}).count()
}
/// Sorted list of layout names: "Model" first, then paper layouts by tab order.
pub fn layout_names(&self) -> Vec<String> {
let mut names = vec!["Model".to_string()];