Repository navigation
blender: exec command (author-time bpy code) + per-frame progress on the builtin transport #692
Description
Why
People are pairing Blender with Claude/Codex to make building animations: construction sequences, fly-throughs, sun studies, exploded views. The blender agent already renders headlessly (IFC → still/turntable), but only through five fixed recipes. FloLess users want to ask in chat for an animation of their model. The terminal AI should author the bpy code once at .flo authoring time, and AWARE should run that exact code deterministically on every run. That is the same model tekla/exec, rhino-8 exec, revit-2026 exec and sketchup-2026 exec already follow.
Long renders (minutes to hours) must also report progress. Otherwise the caller cannot tell a 40-minute animation from a hang.
Scope
1. blender/exec: author-time bpy code, run headless
- New command in
20-agents/aeco/visualization/blender/manifest.yaml:lifecycle: single,mode: write,mode-overridable: true. - Inputs:
code(string, required): Python source definingrun(ctx).args(object, optional).ifc-path|blend-path(optional, mutually exclusive): the scene to start from. An IFC is staged through the existing_stage/_ifc_importso IFC class/material/storey/GUID custom props are present.preset(optional look, same enum asscene.apply-look).output-dir(string): where the code may write.timeout-seconds.
- A fixed
scripts/exec.pywrapper putsscripts/onsys.path, optionally stages the scene, then callsrun(ctx).ctxexposes:ctx.argsandctx.output_dir.- Helpers:
ctx.frame_model(direction)(_framing),ctx.apply_look(preset),ctx.elements()(objects with IFC props),ctx.progress(phase, done, total, message). ctx.render_still(path)/ctx.render_animation(path). These set up output and report frames automatically.
- The return value of
run(ctx)is JSON-framed back through_result(<<<AWARE_RESULT>>>). - Errors:
- A Python exception becomes
{ok:false, code:"exec-error", message, traceback}, a clean error rather than a missing frame. - A syntax error is reported as such.
- A Python exception becomes
- Determinism:
codeis inline in the app source, so it is covered by the locksource-hash(app_lock.rs). No external code file is allowed. dry_run_resultbranch,default_timeout_seconds(render-class: 1800 s), and aninvoker.rsdispatch entry.
2. Progress for the builtin Blender transport (#405 parity)
- Today
node-progress(feat(runtime): progressive large-geometry delivery for first render #405,runtime/progress.rs) is relayed only for the CLI transport.BuiltinInvokernever setsAWARE_PROGRESS_FILE, so Blender never reports. - Wire
relay_progressinto the builtin Blender path: setAWARE_PROGRESS_FILEon the spawnedblenderprocess and relay its records intonode-progressevents. - Add
scripts/_progress.py, which appends{"$aware-progress":{"phase","done","total","message"}}lines. - Register a
render_post/frame_change_posthandler during animation renders so every frame reportsdone/totalwith no author effort. Use it inrender.turntabletoo, and emit stage phases (import,look,render,encode) fromscene.import/render.*. aware agent invoke(builtin): when the caller setsAWARE_PROGRESS_FILE, honour it. FloLess's Render card callsagent invokedirectly and can then tail frames too.
3. Skill + example
skills/exec-bpy.md: the ctx contract, recipes (construction sequence by storey or erection order using keyframed visibility, camera fly-through on a path, sun study via sun-position animation, exploded view, highlight changed GUIDs), and gotchas (EEVEE for animations, the 5.xmedia_typegate, layered actions).30-apps/_examples/model-to-construction-sequence.appwith asafety:block (cf. model-to-renders.app ships four write-mode blender nodes with no safety: block — invalid the moment blender is installed #613).- Tests: Python suite (
tests/) for the wrapper (exception framing, progress records, frame handler), plus Rust tests for dispatch, dry-run and progress relay on the builtin path. Bump the agent to 0.2.0 and reindex.
Out of scope
Live/interactive Blender control (an MCP server). It is non-deterministic and needs a person at the desktop.
Acceptance
aware app runon the example app, against a real IFC, produces an MP4. The run log JSONL containsnode-progressrecords withdoneincreasing tototal(= frame count) during the render, not only at the end.- A bpy exception in
codegives a cleanexec-errorwith the traceback. cargo fmt/clippy -D warnings/testand the Python agent suites are green.
Cross-ref: #405 (progress), #613 (write-node safety), #314. FloLess side: pawellisowski/floless.app (epic linked below).
Activity
pawellisowski commentedon Oct 12, 2026
FloLess side: https://github.com/pawellisowski/floless.app/issues/2231 (epic). Live progress UI there (pawellisowski/floless.app#2228) depends on section 2 of this issue.
feat(blender): exec command for author-time bpy code, literal inputs,…
chore(release): v0.159.0 — Blender exec for author-time bpy (construc…
registry: publish blender 0.2.0 pinned to v0.159.0 (#692) (#697)
pawellisowski commentedon Oct 12, 2026
Shipped in v0.159.0 (npm @aware-aeco/cli@0.159.0, https://github.com/aware-aeco/aware/releases/tag/v0.159.0). The registry now offers blender@0.2.0, pinned to the release commit (#697). Update, run
aware agent install blender@0.2.0, and testblender/exec. Close on pass, or label qa-rejected if it fails. (Reopened: the merge of #696 closed this issue automatically, but it needs a QA pass first.)