← All projects

BOB — Blender Operating Bot

An AI-powered terminal interface for controlling Blender with natural language via a locally-running LLM.

2025Personal Project2 min read
AICreative ToolsCLI
BOB — Blender Operating Bot

Built with

  • Python
  • Blender
  • Ollama
  • Textual

Talking to Blender

Blender is powerful but dense — creating even a simple scene requires navigating menus, knowing keyboard shortcuts, and understanding its data model. BOB replaces that friction with a terminal interface: type what you want in plain English, and a local LLM translates it into Blender API calls.

Create a red cube at the origin
Add a sun light and render a preview
Design a garden with flowers and a stone path

Everything stays local. Prompts go to an Ollama instance on the LAN; nothing reaches the internet.

Architecture

BOB has two components connected by a TCP socket.

The Blender addon (addon.py) installs as a standard add-on and opens a socket server on localhost:12345. It receives Python snippets from the agent and executes them inside Blender’s Python environment, giving the agent access to bpy — Blender’s full scripting API.

The agent TUI (agent_tui.py) is a Textual terminal application. It takes user input, sends it to Ollama with a system prompt describing the Blender API context, extracts the generated code from the response, and forwards it to the addon over the socket.

Blender (>= 5.0)
└── addon.py — socket server on :12345

agent_tui.py — TUI → Ollama LLM → Blender socket

TUI and controls

The terminal interface is built with Textual, giving it a clean split-pane layout with a scrollable chat history and an input bar. The agent streams the LLM’s reasoning before executing — you can watch it think before anything changes in Blender.

TUI commands: /config to edit settings inline, /clear to reset history, /undo and /redo to step through Blender’s undo stack, /exit to quit.

Esc interrupts a running agent mid-task, which stops the LLM generation and prevents the current code from being sent.

Model choice

BOB works with any model served by Ollama. qwen3-coder:30b handles most scene manipulation tasks reliably — object creation, transforms, material assignment, lighting, and basic rendering. Smaller models tend to produce syntactically correct but semantically wrong bpy calls, so a capable code model makes a real difference here.

Security

The addon exposes a raw TCP socket with no authentication — any local process running as the same user can send arbitrary Python to Blender. This is a deliberate trade-off for simplicity in an alpha tool intended for single-user local use. BOB should not be run on shared machines or cloud VMs.

Code & references