Export Director cameras as a USD stage and use runtime shot timing

Address review on #1460:

- Replace the custom JSON manifest and the bpy importer with a plain-text
  .usda stage written from Node (no new dependency) that Blender imports
  natively: Z-up, metersPerUnit 1, one camera per shot with per-frame
  xformOp:transform samples, time codes equal to frame numbers, and lens
  attributes in tenths of a scene unit (Blender multiplies by
  100 * metersPerUnit).
- Take shot timing from shotRuntimeDurationSec/effectiveShotHoldSec, the
  functions Director playback and seeking use, so pack hold overrides,
  minimum holds and evidence-sequence durations match the app.
- Extract runtimeLayerStatesForShot in shotPresentation.js (behaviour
  unchanged) so holds for long scenes are resolved without quadratic work.
- Remove tools/blender Python files; update docs, tests and changelog.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01BahZiNcXqNSvAmR5TCuTAu
This commit is contained in:
UBN606andClaude Opus 5.5 committed 2026-11-03 19:34:33 +00:00
1 parent 6b60b9e969
commit 159c0cfcb0
14 files changed
+624 -865

No files matched your search

+13 -3
View File
@@ -153,8 +153,8 @@ export function effectiveShotHoldSec(
);
}
/** Estimate flight plus effective hold without mutating saved layer parameters. */
export function shotRuntimeDurationSec(scene, shot, packs) {
/** Copy a shot's layer states with registered runtime controls, without mutating saved parameters. */
export function runtimeLayerStatesForShot(shot, packs) {
const states = deepClone(shot?.layers || {});
const sourceRecipe = packs.recipeForShot(shot);
for (const state of Object.values(states)) {
@@ -168,8 +168,18 @@ export function shotRuntimeDurationSec(scene, shot, packs) {
};
}
}
return states;
}
/** Estimate flight plus effective hold without mutating saved layer parameters. */
export function shotRuntimeDurationSec(scene, shot, packs) {
return (
(shot?.durationSec || DEFAULT_SHOT_DURATION_SEC) +
effectiveShotHoldSec(scene, shot, packs, states)
effectiveShotHoldSec(
scene,
shot,
packs,
runtimeLayerStatesForShot(shot, packs),
)
);
}