dsh-plugin-blender-3d
其他 活跃维护

dsh-plugin-blender-3d

walkzzz/dsh-plugin-blender-3d

通过JSON命令桥接Blender,支持创建基本体、布尔CSG、变换、材质、修改器与场景管理,一键导出STL/OBJ/PLY/GLTF,内置无头模式,便于脚本化批量处理三维内容。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
Python
主要语言
MIT
开源协议
51 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:walkzzz/dsh-plugin-blender-3d
git clone https://github.com/walkzzz/dsh-plugin-blender-3d.git
git clone git@github.com:walkzzz/dsh-plugin-blender-3d.git
README.md main

dsh-plugin-blender-3d

A DeepSeek Harness plugin that lets the agent drive 3D modeling through a JSON bridge — create primitives, run boolean CSG, transform, assign materials/modifiers, query the scene, and export STL/OBJ/PLY/GLTF/GLB.

It bundles two interchangeable runtimes speaking the same protocol:

Runtime Needs Blender? Engine Use when
headless_bridge.py (default) ❌ no trimesh + manifold3d headless servers, CI, the harness
blender_ai_bridge/ add-on ✅ Blender 3.0+ bpy you want full Blender power

Point the tool at a running Blender (set AIB_PORT to the add-on's port) and the same commands upgrade to real Blender — no code change.

Install

dsh plugin --profile web add dsh-plugin-blender-3d

Restart dsh web (or let HMR pick it up). The plugin registers two model-facing tools:

  • blender_model — { command, args } → JSON result. Commands: create_shape, boolean, transform, duplicate, delete, rename, material, modifier, mesh_edit, scene, selection, scene_clear, camera, light, render, export, import, script, command, document.
  • blender_scene — lightweight scene summary (names/types/counts, no mesh data).

It also contributes the blender-3d-modeling skill (auto-installed into $DSH_HOME/skills on first load if absent).

OOM-safe by design

Heavy geometry never enters the Node/JSON tool channel. Exports return a file_path; the agent reads the model from disk with its own file tools. This is the fix for the Node Ineffective mark-compacts near heap limit crash that occurs when full meshes are stuffed into JSON.

Configuration

Env / config Default Meaning
AIB_PORT 13082 bridge port (set to the add-on port to drive real Blender)
AIB_HOST 127.0.0.1 bridge host
AIB_PYTHON python3 interpreter for the headless bridge

Headless runtime deps

pip install numpy trimesh manifold3d

Publish to the marketplace

See PUBLISH.md. TL;DR: npm publish → open a PR to
awesome-dsh-plugin/awesome-dsh-plugin
adding registry-entry.json to the list.

License

MIT

Example

node examples/carve_block.mjs   # box minus sphere -> carved.stl