Reference material in the Blender scene (#162) #173

Merged
crowmaki merged 2 commits from issue-162-previz-references into main 2026-10-11 04:27:42 +00:00
Owner

Closes #162. Part of #139.

What

The Blender scene now carries the material the filmmaker times and stages the motion by.

  • Scene spec (studio-core, format 2) gains these fields:

    • markers: one per Line (a dual dialogue pair gets one), named by the start of its text. When a Performance drives the Shot, the frame is the Performance's mark. Otherwise it is the script estimate's default mark. These are the marks a Take of the Shot would start with.
    • audio: the Performance slice, when a Performance drives the Shot.
    • panels: the Board's Panels, in order.
    • location_angle: the Setup's location angle, when its set's current Lock snapshot picks it.

    The spec holds paths only. It writes no files.

  • prepare_blender_scene writes those files into the folder's references/ on every open:

    • the slice as a WAV, exactly the Shot's frames long;
    • the Board images, as a Take is sent them;
    • the locked pick, as a PNG.

    It deletes any file there that the spec no longer names, so a reopened .blend shows the references as they are now.

  • The bootstrap (v2) adds these when it first builds the scene. Reopening the saved file adds nothing.

    • A sound strip from the first frame. Playback is set to audio sync.
    • The markers.
    • The camera background images, at 50% opacity, in front, fitted. Only the first one shows (the location angle, else Panel 1). The rest are a click away in the camera's Background Images.

    The Playblast operator already hid the background images when it rendered (#160).

Small refactors to share logic with Takes:

  • slice_audio is shared with the job builder.
  • shot_units sits beside take_units.
  • locked_location_angle is pulled out of the Slot list candidate.

Testing

  • Seven new integration tests in tests/previz.rs cover:
    • markers from the estimate, and from a Performance (and back to the estimate when the Performance is switched off);
    • the slice WAV, and no audio without a Performance;
    • Panel files, including one removed when the Board shrinks;
    • the location angle, set and cleared;
    • the written spec.
  • cargo test --workspace passes, and clippy has no new warnings.
  • The bootstrap ran headless in Blender 5.2.1 against a spec with every reference. The saved file has the sound strip, both markers and three background images. Reopening through the bootstrap leaves one of each. No older Blender was available, so the pre-4.4 sequences path is untested.

Still to check by hand

  • In Blender with a window, the references are visible while animating and absent from the playblast.
Closes #162. Part of #139. ## What The Blender scene now carries the material the filmmaker times and stages the motion by. - **Scene spec** (studio-core, format 2) gains these fields: - `markers`: one per Line (a dual dialogue pair gets one), named by the start of its text. When a Performance drives the Shot, the frame is the Performance's mark. Otherwise it is the script estimate's default mark. These are the marks a Take of the Shot would start with. - `audio`: the Performance slice, when a Performance drives the Shot. - `panels`: the Board's Panels, in order. - `location_angle`: the Setup's location angle, when its set's current Lock snapshot picks it. The spec holds paths only. It writes no files. - **`prepare_blender_scene`** writes those files into the folder's `references/` on every open: - the slice as a WAV, exactly the Shot's frames long; - the Board images, as a Take is sent them; - the locked pick, as a PNG. It deletes any file there that the spec no longer names, so a reopened `.blend` shows the references as they are now. - **The bootstrap** (v2) adds these when it first builds the scene. Reopening the saved file adds nothing. - A sound strip from the first frame. Playback is set to audio sync. - The markers. - The camera background images, at 50% opacity, in front, fitted. Only the first one shows (the location angle, else Panel 1). The rest are a click away in the camera's Background Images. The Playblast operator already hid the background images when it rendered (#160). Small refactors to share logic with Takes: - `slice_audio` is shared with the job builder. - `shot_units` sits beside `take_units`. - `locked_location_angle` is pulled out of the Slot list candidate. ## Testing - Seven new integration tests in `tests/previz.rs` cover: - markers from the estimate, and from a Performance (and back to the estimate when the Performance is switched off); - the slice WAV, and no audio without a Performance; - Panel files, including one removed when the Board shrinks; - the location angle, set and cleared; - the written spec. - `cargo test --workspace` passes, and clippy has no new warnings. - The bootstrap ran headless in Blender 5.2.1 against a spec with every reference. The saved file has the sound strip, both markers and three background images. Reopening through the bootstrap leaves one of each. No older Blender was available, so the pre-4.4 `sequences` path is untested. ## Still to check by hand - [ ] In Blender with a window, the references are visible while animating and absent from the playblast.
The scene spec now carries a marker at each Line's start (the
Performance's marks when one drives the Shot, else the script
estimate's), the Performance slice as audio, the Board's Panels and the
locked location angle. Opening in Blender writes those files into the
folder's references, and the bootstrap adds the sound strip, markers and
camera background images when it first builds the scene.

Co-Authored-By: Claude <noreply@anthropic.com>
Name the private spec builder after what it returns, share the Panel
file name, and document the marker frame and the Performance fixture.

Co-Authored-By: Claude <noreply@anthropic.com>
crowmaki deleted branch issue-162-previz-references 2026-10-11 04:27:42 +00:00
Sign in to join this conversation.
No description provided.