MCP: Previz (#185) #215
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!215
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-185-mcp-previz"
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 #185. Part of #157.
A harness can now take a Complex shot through Previz: flag the Shot, read its Blender scene spec, build and animate the scene through a Blender MCP, and attach the Playblast. Each tool wraps the same
ApiImplcommand the UI uses. The edits land in the undo log with their usual labels: "Mark shot complex", "Unmark shot complex" and "Import playblast".Tools
set_shot_complex: marks a Shot complex or unmarks it. Unmarking keeps its versions. Returnsread_shot_previz.read_shot_previz:complex,status(none,currentormismatched),current,versionsoldest first, andrefused.prepare_blender_scene: writes the scene spec, its reference files and the bootstrap into the Shot's previz folder, as Open in Blender does. Returnsfolder,specFile,script,blendFile,reopens,setAsideand the camelCasespec: size, frames, subjects with their figure colours, Line markers, and the paths of the reference files (audio,panels,locationAngle) and ofoutput. Withrebuild, it moves the saved Blender file aside first. The description tells an agent in a running Blender to setsys.argvto end in--and the spec file before it runs the bootstrap. It also says the spec file uses snake_case keys, and that a video written tooutputis picked up by itself, so the agent shouldn't attach it as well.attach_playblast: imports a video from an absolute path as the Shot's next previz version, the same ingest as "Import playblast…". ReturnsversionIdandpreviz.open_in_blender: the optional "Open in Blender" (and withrebuild, "Rebuild Blender scene"). It starts Blender on the filmmaker's machine and returnsread_shot_previz.The server instructions now define Complex shot, Previz and Playblast in the glossary, and put Previz in the pipeline order.
Core
BlenderScenenow carries thePrevizSceneSpecit wrote, so the tool returns exactly what is inscene.json.ApiImpl::prepare_blender_sceneis shared by the Open in Blender command and the MCP tool. The new DTOs are MCP-only, sobindings.tsis unchanged.Tests
src-tauri/tests/mcp_previz.rscovers:scene.jsonmatches the returned spec. A second call reopens the saved file, andrebuildsets it aside.The full
cargo test --workspaceandbun testpass.Known limits
open_in_blenderhas no test. It would start a real Blender on a machine that has one installed.