M8.9: Perspective grid presets: built-in views, Save Grid as Preset, presets manager

View > Perspective Grid > One/Two/Three Point Perspective list the built-in views
([1P/2P/3P-Normal View], plus Low and High views generated in code) and the saved
presets of each type; Save Grid as Preset... and Define Grid's Preset menu and Save
Preset... save the fields. Edit > Perspective Grid Presets... (previously a
mislabelled reset to the two-point grid) manages them: New, Edit, Delete, Import,
Export (.vcperspective), stored with the preferences. New commands
perspective.presets.list/save/delete/export/import; perspective.grid.preset takes
a preset name. Preset import is fuzzed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-06 10:51:12 +07:00
co-authored by Claude Opus 5.5
parent 3d850a2864
commit c3c4185cef
14 changed files with 1044 additions and 42 deletions
@@ -38,6 +38,11 @@ pub const BUILTINS: [(&str, u8, f64); 8] = [
("[3P-Low View]", 3, 0.66),
];
/// Is `name` a built-in preset's (any case)?
pub fn is_builtin(name: &str) -> bool {
BUILTINS.iter().any(|b| b.0.eq_ignore_ascii_case(name.trim()))
}
/// The first artboard of `doc` (a Letter page without one).
pub fn first_artboard(doc: &Document) -> Rect {
doc.artboards.first().map_or(LETTER, |a| a.rect)