Pick up playblasts from the Shot's previz folder (#163) #174

Merged
crowmaki merged 2 commits from issue-163-playblast-pickup into main 2026-10-11 05:05:12 +00:00
Owner

Closes #163. Part of #139.

What changed

  • Core scan (ProjectSession::scan_playblasts): checks each complex Shot's previz folder for playblast.mp4 and ingests anything new through the existing ingest command as a picked up version. A new write to the same path becomes a new version. Earlier versions are never touched.
  • When it runs: ProjectSession::open runs it, so Playblasts written while the Project was closed arrive on open. The Tauri app also watches <media>/previz with notify-debouncer-mini (2 s settle) and only calls the scan from there (ADR-0003).
  • Scan memory: a new table playblast_pickup (migration V48) records each file the scan has seen, by content hash. Undo never touches it, so:
    • undoing a pick-up doesn't bring the same file back on the next scan;
    • a refused Playblast (outside 2–15 s) is reported once and never retried, even after the Project is reopened.
  • Reporting refusals: a refusal appears in the scan result and on ShotPreviz.refused. The Shot's previz panel shows it until a version arrives after it.
  • Half-written files: a file ffmpeg can't read a video from yet (for example, one Blender is still writing) is skipped silently and picked up on a later scan.
  • Opening a Project never fails because of the scan.

Tests

New integration tests in crates/studio-core/tests/previz.rs check:

  • pick-up on open;
  • a newer file becomes a new version, and an unchanged file adds none;
  • a hand-imported output isn't picked up again;
  • an undone pick-up stays undone;
  • a refusal is reported once and survives reopening;
  • a too-long file is refused;
  • a half-written file is skipped silently;
  • a Shot that isn't complex isn't scanned.

The full Rust workspace, svelte-check and bun tests pass.

Not checked yet

  • By hand: rendering in Blender updates the Shot's previz panel and dot while the app is open. I haven't done this yet; it needs a real Blender install.
Closes #163. Part of #139. ## What changed - **Core scan** (`ProjectSession::scan_playblasts`): checks each complex Shot's previz folder for `playblast.mp4` and ingests anything new through the existing ingest command as a *picked up* version. A new write to the same path becomes a new version. Earlier versions are never touched. - **When it runs:** `ProjectSession::open` runs it, so Playblasts written while the Project was closed arrive on open. The Tauri app also watches `<media>/previz` with `notify-debouncer-mini` (2 s settle) and only calls the scan from there (ADR-0003). - **Scan memory:** a new table `playblast_pickup` (migration V48) records each file the scan has seen, by content hash. Undo never touches it, so: - undoing a pick-up doesn't bring the same file back on the next scan; - a refused Playblast (outside 2–15 s) is reported once and never retried, even after the Project is reopened. - **Reporting refusals:** a refusal appears in the scan result and on `ShotPreviz.refused`. The Shot's previz panel shows it until a version arrives after it. - **Half-written files:** a file ffmpeg can't read a video from yet (for example, one Blender is still writing) is skipped silently and picked up on a later scan. - Opening a Project never fails because of the scan. ## Tests New integration tests in `crates/studio-core/tests/previz.rs` check: - pick-up on open; - a newer file becomes a new version, and an unchanged file adds none; - a hand-imported output isn't picked up again; - an undone pick-up stays undone; - a refusal is reported once and survives reopening; - a too-long file is refused; - a half-written file is skipped silently; - a Shot that isn't complex isn't scanned. The full Rust workspace, svelte-check and bun tests pass. ## Not checked yet - [ ] **By hand:** rendering in Blender updates the Shot's previz panel and dot while the app is open. I haven't done this yet; it needs a real Blender install.
A scan compares each complex Shot's previz folder output with what it has
seen and ingests new renders as picked-up previz versions. It runs when a
Project opens and whenever the app's folder watcher settles. The scan
remembers each render by hash outside undo, so undoing a pick-up never
brings it back and a refused render is reported once, in the scan result
and the Shot's previz panel, and never retried.
Only a Playblast ffmpeg can read is picked up or refused, so one Blender
is still writing is left for the next scan instead of being refused for
good. Opening a Project no longer fails when the scan does. Docs and the
previz panel say Playblast, not render.
crowmaki deleted branch issue-163-playblast-pickup 2026-10-11 05:05:12 +00:00
Sign in to join this conversation.
No description provided.