Camera fit: made-for height, distance and offset for camera motions #11

Merged
dev merged 1 commits from devin/1796110078-camera-fit into main 2026-12-01 08:35:47 -05:00
Owner

Stacked on #10.

Adds a Camera fit... popup next to Camera follow in the Timeline, for camera .vmd motions made for a different model:

  • Made for height: height of the model the camera was made for (default 20, standard MMD size). Measure model... reads it from a model file.
  • Fit to model: sets Height scale = followed model height / made-for height. Height scale multiplies the camera's Y (eye and target).
  • Distance: moves the eye along the view direction (closer/farther), keeping cuts and timing.
  • Offset X/Y/Z: shifts eye and target (model space, Y up).
  • Follow model placement (on by default): the camera is transformed by the followed model's Position/Rotation/Scale, so a moved or scaled model stays framed as authored.

Followed model = the selected non-stage model, else the first visible non-stage model. All values are saved under timeline.cameraFit in .mrscene; CLI: --camera-made-for H --camera-fit, --camera-height S, --camera-distance S, --camera-offset x,y,z.

Also adds FileBrowser::isOpen() so a cancelled Measure model... doesn't hijack the next file open.

Tests: scene round-trip covers the new fields.

Stacked on #10. Adds a **Camera fit...** popup next to *Camera follow* in the Timeline, for camera `.vmd` motions made for a different model: - **Made for height**: height of the model the camera was made for (default 20, standard MMD size). **Measure model...** reads it from a model file. - **Fit to model**: sets **Height scale** = followed model height / made-for height. Height scale multiplies the camera's Y (eye and target). - **Distance**: moves the eye along the view direction (closer/farther), keeping cuts and timing. - **Offset X/Y/Z**: shifts eye and target (model space, Y up). - **Follow model placement** (on by default): the camera is transformed by the followed model's Position/Rotation/Scale, so a moved or scaled model stays framed as authored. Followed model = the selected non-stage model, else the first visible non-stage model. All values are saved under `timeline.cameraFit` in `.mrscene`; CLI: `--camera-made-for H --camera-fit`, `--camera-height S`, `--camera-distance S`, `--camera-offset x,y,z`. Also adds `FileBrowser::isOpen()` so a cancelled *Measure model...* doesn't hijack the next file open. Tests: scene round-trip covers the new fields.
dev changed target branch from devin/1796106677-postfx to main 2026-12-01 08:35:38 -05:00
dev added 1 commit 2026-12-01 08:35:38 -05:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
dev merged commit 21d0910e8e into main 2026-12-01 08:35:47 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dev/3d-model-renderer#11