Blender add-on: importGltf, setCamera, setLight, setWorld, renderStill #2
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/blender-scene-actions"
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?
Adds five Blender command actions (
brokkr.blender.command_intent.v0) tosurfaces/blender/brokkr_bridge. Separate branch offmain, independent of the server-hardening PR (#1).importGltffilepath.gltf/.glbinside the Import Directory preference onlysetCameratargetObjectName,lens,cameraType(PERSP/ORTHO/PANO),panoramaType(e.g.EQUIRECTANGULAR),orthoScale,clipStart,clipEnd,activeactivesetsscene.camerasetLighttargetObjectName,energy,color[r,g,b],lightTypesetWorldworldName,color,strengthrenderStilloutputPath,engine,resolutionX/Y,cameraName.png/.jpg/.exr; engine must be one the running Blender offers; 1..16384 pxSafety rules
..collapsed, symlinks followed), then tested for containment:../x, absolute paths and symlinks that escape are refused before anybpycall.failedreceipt naming the rule.renderStillrestores engine, resolution, camera, file path and format afterwards, including when the render raises. It blocks the UI while rendering (documented).asset.import.gltf,camera.write,light.write,world.write,render.stilladded to the add-on's list. The Rust daemon'sbrokkr.blender_editoradvertisement is not updated here (left for a follow-up so this PR stays in the add-on and docs).Tests
python3 -m unittest discover -s surfaces/blender/tests -v: 16 tests with a fakebpy, all pass: containment (including.., absolute, symlink escape), disabled-when-unconfigured, extension/exists checks, camera/light/world field effects and whole-intent refusal, panorama property fallback for Blender < 4.2, render restore on success and on failure, nothing renders on any refused input.Not tested (Blender not installed or run)
The real
bpy.ops.import_scene.gltf, render ops,panorama_typelocation across Blender versions, world node names (Background, inputsColor/Strength), engine enum names in the target Blender. Needs a live Blender smoke.Merge note
Touches
__init__.py(new preferences,configure_action_dirscalls before drain) in places the server-hardening PR (#1) also edits nearby; expect a trivial textual conflict to resolve for whichever merges second. Not merged.🤖 Generated with Claude Code