Open in Blender: basic scene and the Playblast operator (#160) #171
No reviewers
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
needs-info
needs-triage
question
ready-for-agent
ready-for-human
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crowmaki/ai-studio!171
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-160-open-in-blender"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #160. Part of #139.
What it does
scene.jsonand the shippedbootstrap.pyinto the Shot's previz folderpreviz/<shot id>/in the media folder, then starts Blender. The folder is named by Shot id, so relabelling a Shot never breaks the link. The first run builds the scene and savesscene.blend. Later runs reopen that file, and the app never overwrites it.scene-set-aside-N.blendin the same folder, then builds the scene again.previz_scene.rs, studio-core, per ADR-0003): a pure read of the Shot. It holds:render_sizethat Takes use)PREVIZ_PALETTEplayblast.mp4crates/studio-core/blender/bootstrap.py): builds a ground plane, a camera, and one flat-coloured figure per subject, named after its Character, in a line-up in front of the camera. Both the build and the reopen register Playblast for AI Studio, which you can run from the N-panel AI Studio tab or the Render menu. It sets the output path, size, frame range and fps, and H.264 MP4 output. It switches the viewport to solid/flat/object-colour shading with no overlays and camera background images hidden. Then it runs a viewport render of the animation and restores the viewport afterwards. Colours are converted to linear and shown with the Standard view transform, so the pixels match the palette hex exactly.blender.json) on a new Blender page in App settings. The lookup order isAI_STUDIO_BLENDER, then the user's pick, then detection: the newestBlender Foundation\Blender X.Yand Steam on Windows,/Applicationson macOS, andPATH. When nothing is found, the error explains how to fix it.previz/out of orphan files, so Purge can't delete a workingscene.blend.Checks
tests/previz.rscover:.blenduntouchedcurrentblender.rscover detection order and the error messages.cargo test --workspace --all-features,bun testandbun run checkall pass.scene.blendbyte-identical, and running the script twice in one session works. In the running app, Open in Blender detected 5.2 and built the scene. Rebuild leftscene-set-aside-1.blendbeside the new file. A missing pick shows the error.currentpath is covered by the test above.Notes / follow-ups
.blendfiles and the folders of deleted Shots are invisible to Storage until #167 lists previz working files.Screenshots