Files
OneCAD/crates/ui-egui/tests/scenarios/view_apply_named_view.json
T
Jonas Wrede 27f20f97cb feat: view.apply restores a named view or camera; MCP screenshot takes a named view or camera (#528) (#595)
New view.apply command restores a named view, a standard view or any camera (view state, not an undo step); the desktop viewport follows it and the browser's Restore uses it. The MCP screenshot tool takes a named view or a camera. Un-ignores the #528 regression test. Fixes #528.

Co-authored-by: jonaswre <jonas.wrede@beyondit.gmbh>
2026-10-13 05:22:52 -04:00

11 lines
684 B
JSON

[
{"call": "engine.execute", "params": {"command": "solid.box", "params": {"length": 40, "width": 20, "height": 10}}},
{"call": "engine.execute", "params": {"command": "solid.cylinder", "params": {"radius": 4, "height": 12, "base": [10, 10, 10]}}},
{"call": "engine.execute", "params": {"command": "view.save", "params": {"name": "Photo", "camera": {"target": [20, 10, 8], "yaw": 2.3, "pitch": 0.35, "distance": 120}}}},
{"call": "ui.view", "params": {"view": "top"}},
{"shot": "view_apply_before_top"},
{"call": "engine.execute", "params": {"command": "view.apply", "params": {"view": "Photo"}}},
{"expect": {"camera_matches": "Photo"}},
{"shot": "view_apply_after_photo"}
]