Skip to content

arigl: --set's camera keys hold over the scene's first framing - #1307

Merged
transfix merged 1 commit into
masterfrom
fix/arigl-camera-set
Nov 16, 2026
Merged

transfix merged 1 commit into
masterfrom
fix/arigl-camera-set

Conversation

@transfix

Copy link
Copy Markdown
Owner

Setting the camera from the command line didn't work for orbit or fly poses. --set writes its keys before the document loads, and realizing the scene then frames the main camera (AriRuntime::realize → CameraController::frameBounds, AriRuntime.cpp:157), which overwrote viewers.main.camera.orbit.* and fly.*. Track mode survived only because frameBounds leaves it alone.

Change

  • host_cli: view_state_sets(sets) returns the --set entries under viewers. (relative or absolute), in order.
  • arigl, in a window and with --terminal: once the document has loaded, it writes those again. The camera re-reads its state on the write (handleStateChanged → readAllFromState → applyToCamera), so the pose holds. Keys outside viewers. are not written again, so nothing the document changed while loading is undone.
  • The usage text and ARIADNE.md (arigl's section) list the camera's keys, with two examples: an orbit pose over terrain_lab's lake, and the track camera behind a crate.

Checked (MSVC Release, Windows)

  • ariadne_host_test: 12/12 AriadneHostCli tests, including the new ViewSetsAreTheOnesUnderViewers.
  • arigl snapshot of terrain_lab with orbit.center=(22,180,0), distance 45, elevation 18, azimuth -120 now frames the crates' lake. Before, it showed the default whole-world framing. The track-mode snapshot still works.
  • The last commit's only code change after the build is clang-format's line wrap in host_cli.cpp.

Not checked: Linux, macOS, and arigl-web (the same code path; the browser passes its boot args the same way).

--set writes its keys before the document loads, so its nodes can seed
from them. Realizing the scene then frames the main camera
(AriRuntime::realize -> CameraController::frameBounds), which wrote
the framed pose over viewers.main.camera.orbit.* and fly.*, so a
camera set from the command line never took. Track mode survived only
because frameBounds leaves it alone.

- host_cli: view_state_sets(sets), the --set entries under viewers.
  (relative or absolute), in order.
- arigl, in a window and with --terminal: once the document has loaded,
  it writes those again. The camera re-reads its state on the write
  (handleStateChanged), so the orbit and fly poses hold. Other keys are
  not written again, so nothing the document changed while loading is
  undone.
- The usage text and ARIADNE.md list the camera's keys, with examples.
- ariadne_host_test: ViewSetsAreTheOnesUnderViewers.
@transfix
transfix enabled auto-merge (squash) November 16, 2026 07:39
@transfix
transfix merged commit 6f42cea into master Nov 16, 2026
2 of 29 checks passed
@transfix
transfix deleted the fix/arigl-camera-set branch November 16, 2026 07:44
transfix added a commit that referenced this pull request Nov 16, 2026
…#1307)

One conflict, in ariadne_runtime_test.cpp's ActionCapsAreTreeSettingsAndChargeAsyncCalls: this
branch cut its loop to 20 rounds so it fit the 0.1 s time cap on Linux debug CI, and master
(#1282) rewrote the test, raising the time cap to 30 s wherever the loop must finish.
Master's fix covers the same flake, so the test is master's as it stands, 200 rounds again.

tools/singleton_scan is master's (#1276); the auto-merged net, CI, test and doc files keep both
sides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant