Skip to content

Commit ed0e2f0

Browse files
dev-swarupclaude
andcommitted
docs: rewrite README and document repository installs
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 53ca965 commit ed0e2f0

1 file changed

Lines changed: 308 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 308 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
# Blender AI
2+
3+
[![CI](https://github.com/dev-swarup/Blender-AI/actions/workflows/ci.yml/badge.svg)](https://github.com/dev-swarup/Blender-AI/actions/workflows/ci.yml)
4+
[![License: GPL v3+](https://img.shields.io/badge/license-GPL--3.0--or--later-blue.svg)](LICENSE)
5+
6+
A prompt bar for Blender's 3D Viewport. Describe a result and specialist AI agents build it with typed
7+
tools: models, materials and PBR textures, rigs, animation, physics, lighting and cameras. It works with
8+
any OpenAI-compatible provider and with Anthropic.
9+
10+
![The Blender AI prompt bar after building a crate](docs/screenshots/bar_done.png)
11+
12+
Blender AI is a free, open-source extension for Blender 4.2 LTS and later. Each tab of the bar is an
13+
agent with its own conversation, instructions and toolset. Agents call high-level tools, fall back to
14+
full `bpy` Python, use any MCP servers you connect, and delegate self-contained parts of a job to
15+
sub-agents that run in parallel. Every step is logged as it happens, every step is a single undo, and
16+
agents inspect the viewport to verify their own work.
17+
18+
The screenshots in this document are produced by `tests/ui_smoke.py` against a scripted local API, so the
19+
step logs show scripted replies rather than live model output.
20+
21+
## Contents
22+
23+
- [Features](#features)
24+
- [Requirements](#requirements)
25+
- [Installation](#installation)
26+
- [Updating](#updating)
27+
- [Configuration](#configuration)
28+
- [Usage](#usage)
29+
- [Agents and sub-agents](#agents-and-sub-agents)
30+
- [MCP servers](#mcp-servers)
31+
- [Textures and image models](#textures-and-image-models)
32+
- [Python execution](#python-execution)
33+
- [Settings](#settings)
34+
- [Security and privacy](#security-and-privacy)
35+
- [Troubleshooting](#troubleshooting)
36+
- [Development](#development)
37+
- [License](#license)
38+
39+
## Features
40+
41+
- **Provider-agnostic.** Choose **OpenAI-compatible** (OpenAI, OpenRouter, Gemini, Groq, DeepSeek, xAI,
42+
Mistral, Together, Ollama, LM Studio, LiteLLM, vLLM and others) or **Anthropic**. You supply a URL and
43+
a key. The OpenAI-compatible agent runs on the OpenAI Agents SDK; the Anthropic agent runs on the
44+
Anthropic SDK with extended thinking and prompt caching.
45+
- **Models from your API.** The model and image-model pickers list what your provider's `/models`
46+
endpoint returns, with search. Nothing is hard-coded.
47+
- **Four specialist agents.** Model Builder, Scene Builder, Animator and Material Generator, each with
48+
its own conversation, instructions and tools.
49+
- **Parallel sub-agents.** An agent can hand independent parts of a job to other specialists that work
50+
at the same time, for example one Model Builder per house in a village.
51+
- **Native-looking UI.** Tabs, a multi-line prompt, model, reasoning and image-model dropdowns, and a
52+
Generate button. Colors, rounding and sizes follow your Blender theme and UI scale.
53+
- **High-level tools.** Whole jobs in one call: scattering with geometry nodes, rigid-body and cloth
54+
physics, curves and 3D text, Rigify rigs, walk cycles, camera moves, PBR materials. Anything else
55+
falls back to Python with full `bpy` access.
56+
- **MCP client.** Connect services such as Meshy or Tripo; their tools appear beside the built-in ones.
57+
- **PBR textures.** A seamless base color from your image model; normal, roughness, height, AO and
58+
metallic maps are derived locally and wired into a Principled BSDF.
59+
- **Self-contained files.** Generated and imported textures are packed into the `.blend`.
60+
- **Light on startup.** A small part loads with Blender; the rest loads in the background.
61+
- **Helper add-ons.** Offers to install Rigify, MPFB, LoopTools and Extra Mesh Objects in one click.
62+
63+
![Typing a prompt](docs/screenshots/bar_typing.png)
64+
65+
## Requirements
66+
67+
- Blender 4.2 LTS or later (Windows x64, macOS Apple silicon or Intel, Linux x64)
68+
- Blender's **Allow Online Access** enabled (*Edit ▸ Preferences ▸ System ▸ Network*)
69+
- An API key for an AI provider that supports tool calling, or a local server such as Ollama
70+
71+
All Python dependencies are bundled in the extension. Nothing is installed into your system Python.
72+
73+
## Installation
74+
75+
The extension ships as a single zip for every platform; Blender unpacks only the files your system
76+
needs. There are two ways to install it. Use the repository method if you want Blender to deliver
77+
updates.
78+
79+
### Recommended: add the repository
80+
81+
1. Open *Edit ▸ Preferences ▸ Get Extensions*.
82+
2. Open the dropdown at the top right, choose **Repositories**, click **+** and choose
83+
**Add Remote Repository**.
84+
3. Paste this URL, tick **Check for Updates on Startup**, and confirm:
85+
86+
```text
87+
https://github.com/dev-swarup/Blender-AI/releases/latest/download/index.json
88+
```
89+
90+
4. Search for **Blender AI** in *Get Extensions* and click **Install**.
91+
92+
Blender now treats Blender AI like any extension from extensions.blender.org. See [Updating](#updating).
93+
94+
### Alternative: install from a zip
95+
96+
Download `blender_ai-<version>.zip` from the [latest release](https://github.com/dev-swarup/Blender-AI/releases/latest)
97+
and drag it onto an open Blender window, or use *Get Extensions ▸ ⌄ ▸ Install from Disk…*. Extensions
98+
installed from disk go to a local repository, which Blender never checks for updates; install a newer zip
99+
over it to upgrade.
100+
101+
### First start
102+
103+
With online access on, Blender AI asks once whether to install its helper add-ons: Rigify (included with
104+
Blender), MPFB, LoopTools and Extra Mesh Objects. They are downloaded through Blender's own extension
105+
system from extensions.blender.org (about 46 MB, mostly MPFB). You can skip the prompt and install them later from the
106+
add-on's preferences.
107+
108+
![Install helper add-ons](docs/screenshots/helpers_dialog.png)
109+
110+
## Updating
111+
112+
When the repository is added with **Check for Updates on Startup**, Blender checks for new releases when
113+
it starts and shows a notification in the status bar if one is available. Open *Get Extensions*, then
114+
use **Update** next to Blender AI or **Update All**. To check on demand, use **Refresh Remote** (the
115+
sync icon) in the same editor.
116+
117+
Each release publishes an `index.json` listing next to the zip. The repository URL above always resolves
118+
to the latest release, so nothing needs to change on your side. Pre-releases are never offered.
119+
120+
## Configuration
121+
122+
1. Open the settings: click the **gear** on the prompt bar, then **All Settings…**
123+
2. Choose **OpenAI-compatible** or **Anthropic**.
124+
3. Pick your provider from the **⌄** next to *API URL*, or paste a URL, then paste your **API key** and
125+
click **Test Connection**. The model list loads and a model is selected for you; change it any time
126+
from the bar.
127+
128+
![Settings](docs/screenshots/settings.png)
129+
130+
| Provider | API URL | Notes |
131+
|---|---|---|
132+
| OpenAI | `https://api.openai.com/v1` | Chat and image models with one key |
133+
| OpenRouter | `https://openrouter.ai/api/v1` | Many chat and image models with one key |
134+
| Google Gemini | `https://generativelanguage.googleapis.com/v1beta/openai` | |
135+
| Groq, DeepSeek, xAI, Mistral, Together | in the **⌄** list | |
136+
| Ollama / LM Studio (local) | `http://localhost:11434/v1` / `http://localhost:1234/v1` | No key needed; use a model with tool support |
137+
| Anthropic | `https://api.anthropic.com` | Choose the **Anthropic** provider; add a separate image API for textures |
138+
139+
The model must support **tool calling**. Most current models do.
140+
141+
## Usage
142+
143+
Press **Ctrl+Space** in the 3D Viewport (or click the bar), type a request, and press **Enter** or click
144+
**Generate**.
145+
146+
| Tab | Example |
147+
|---|---|
148+
| 3D Model | `A wooden crate with worn PBR planks and metal corner brackets` |
149+
| Scene | `A forest clearing with scattered rocks and trees, sunset light, camera at eye level` |
150+
| Animation | `Rig this character with Rigify and make it walk in a circle` |
151+
| Material | `Make the floor polished concrete with subtle cracks` |
152+
153+
While an agent works, the step log above the bar shows its reasoning and each tool call with its result;
154+
click a row to expand it. Press **Esc** or **Stop** to interrupt. Every step is one undo step.
155+
156+
![A request in progress](docs/screenshots/bar_running.png)
157+
158+
| Control | Function |
159+
|---|---|
160+
| Tabs | Select the agent. Each tab keeps its own conversation. |
161+
| **+** | Attach a reference image (click again to remove). Texture tools can use it. |
162+
| Model | Pick the AI model. Type to filter the list from your API; ↑/↓ and Enter also work. |
163+
| Reasoning | Auto, Low, Medium or High. Auto uses the model's default. |
164+
| Image model | The model used for generated textures. |
165+
| ⚙ | Quick settings: provider, models, viewport screenshots, Python confirmation, *All Settings…* |
166+
| Generate / Stop | Send the request, or stop it while it runs. |
167+
168+
![The model dropdown, filtered by typing](docs/screenshots/dropdown_model.png)
169+
170+
| Key (while typing) | Action |
171+
|---|---|
172+
| Enter / Shift+Enter | Generate / new line |
173+
| Esc or Ctrl+Space | Leave the bar |
174+
| Tab | Next tab |
175+
| ↑ / ↓ | Move between lines, then through earlier prompts |
176+
| Ctrl+V / Ctrl+C / Ctrl+X | Paste / copy all / cut all |
177+
178+
Viewport navigation keeps working while the bar is focused, and Blender shortcuts with Ctrl or Alt
179+
(Ctrl+S, Ctrl+Z, F12 and so on) pass through. The **Blender AI** tab in the sidebar (**N**) shows the
180+
full step log, token usage, and buttons for a new conversation and settings.
181+
182+
## Agents and sub-agents
183+
184+
| Tab | Agent | Scope |
185+
|---|---|---|
186+
| 3D Model | Model Builder | Props, vehicles, buildings, character bodies, game-map pieces: blockout, detail passes, bevels, UVs, materials |
187+
| Scene | Scene Builder | Layout, terrain, scattering, lighting, camera, world |
188+
| Animation | Animator | Rigs, keyframes, walk cycles, NLA, camera moves, physics |
189+
| Material | Material Generator | PBR textures from an image model or a photo, procedural and layered shaders |
190+
191+
Each agent has the tools for its job plus full Python. When a request splits into independent pieces,
192+
the agent calls `spawn_agents`: every sub-agent receives a complete brief, its own collection to build
193+
in and a fresh context, and they work concurrently in the same scene. Their steps appear in the log
194+
prefixed with the task name (`House › create_primitive`), and the parent agent checks and assembles the
195+
results. Stop (Esc) stops all of them.
196+
197+
Limits: four sub-agents at once, two levels deep, 16 per request. While sub-agents run, the AI cannot use
198+
undo, since it would revert everyone's steps; your own Ctrl+Z still works.
199+
200+
## MCP servers
201+
202+
MCP servers add tools from other services. Meshy and Tripo, for example, generate 3D models from text or
203+
images; the agent calls them and imports the result with `import_from_url`.
204+
205+
1. Find the service's **MCP configuration**, the JSON block with `"mcpServers"` published for Claude
206+
Desktop, Cursor or VS Code, and copy it.
207+
2. In Blender AI settings, open **MCP servers** and click **Paste JSON config**, or click **+** and enter
208+
a command (for example `uvx some-mcp-server`) or a URL for hosted servers.
209+
3. Provide the API key where the config expects it (usually *Keys / environment*, for example
210+
`MESHY_API_KEY=…`) and click **Connect**. Each server reports *connected · N tools* or its error.
211+
212+
New MCP tools are available from the next **New Conversation**. Servers launched with `npx` or `uvx`
213+
need Node.js or uv on your machine.
214+
215+
## Textures and image models
216+
217+
`generate_texture` asks your image model for a seamless, flat-lit surface, derives the remaining PBR maps
218+
locally and builds the material. With an OpenAI-compatible provider the image model comes from the same
219+
API (select it on the bar). With Anthropic, or to use another image service, fill in **Separate image
220+
API** in settings. `reference_to_pbr` turns your own photo into a material without any API call. Objects
221+
need UVs; the agent unwraps them first.
222+
223+
## Python execution
224+
225+
Agents can run Python inside Blender with full access, like the Python console. They use it for geometry
226+
nodes, procedural meshes, bulk edits and anything the tools don't cover. Each run is one undo step.
227+
228+
To review scripts before they run, enable **Ask before running Python** (in the ⚙ popover or settings).
229+
A dialog then shows which agent is asking, what the script is for and its code, with **Yes, run it** and
230+
**Cancel**. Cancel tells the agent you declined.
231+
232+
![The approval dialog](docs/screenshots/approval_dialog.png)
233+
234+
## Settings
235+
236+
The essentials are provider, URL, key and model. Everything else has defaults under **More options**.
237+
238+
| Setting | Default | Notes |
239+
|---|---|---|
240+
| Ask before running Python | Off | Shows each script and waits for approval |
241+
| Let the AI see the viewport | On | Sends a screenshot after steps that change the scene |
242+
| Max steps | 60 | Model turns per request before it pauses; send a message to continue |
243+
| Pack textures into the .blend | On | Stores generated and imported images inside the file |
244+
| Texture folder / Normal maps | extension folder / OpenGL | |
245+
| Refusal fallback | On | Anthropic first-party API only |
246+
| Prompt bar shortcut | Ctrl+Space | Rebindable |
247+
248+
**Helper add-ons** lists Rigify, MPFB, LoopTools and Extra Mesh Objects with their status;
249+
**Install helper add-ons** installs and enables any that are missing.
250+
251+
Environment variables `OPENAI_API_KEY`, `OPENAI_BASE_URL`, `ANTHROPIC_API_KEY` and `ANTHROPIC_BASE_URL`
252+
are used as fallbacks. The complete tool reference is in [docs/tools.md](docs/tools.md).
253+
254+
## Security and privacy
255+
256+
- **Data sent.** Prompts, a short text summary of the scene, tool results, viewport screenshots (if
257+
enabled) and attached images go to your AI provider. Texture prompts and reference images go to your
258+
image API. Nothing is sent while Blender's online access is off. Tracing in the OpenAI Agents SDK is
259+
disabled, so runs are never uploaded to OpenAI's dashboard.
260+
- **Keys** are stored in plain text in your Blender preferences and never in `.blend` files. Use the
261+
environment variables if you prefer not to store them.
262+
- **Python** written by an agent runs with your user's permissions, like any script in Blender. Enable
263+
*Ask before running Python* to approve each one.
264+
- **MCP servers** are programs or services you choose to connect; command servers run on your computer.
265+
Add only servers you trust.
266+
- **Helper add-ons** are installed only when you click **Install**, through Blender's extension system
267+
from extensions.blender.org.
268+
269+
To report a vulnerability, see [SECURITY.md](SECURITY.md).
270+
271+
## Troubleshooting
272+
273+
| Problem | Fix |
274+
|---|---|
275+
| "Online access is off" | *Preferences ▸ System ▸ Network ▸ Allow Online Access* |
276+
| "The API key was rejected" or "Not found" | Check key and URL with **Test Connection**; select the provider from the **⌄** list |
277+
| The model list is empty | Click **↻** next to Model; some local servers list models only while one is loaded |
278+
| "Doesn't support tools", or the AI only chats | Select a model with tool or function calling |
279+
| "This model doesn't accept images" | Screenshots are turned off for that model automatically; send again |
280+
| An MCP server shows *failed* | Read the message and the log it names; check the command, Node.js or uv, and the key |
281+
| Ctrl+Space no longer maximizes the 3D View | Rebind it under *More options*, or use Ctrl+Alt+Space for fullscreen |
282+
| Install fails on Windows with a very long path | Enable Win32 long paths (`LongPathsEnabled`) or use a shorter Blender config folder |
283+
| Textures look stretched | The object needs UVs; ask the agent to unwrap it |
284+
| No update is offered | Confirm the repository was added with the URL above and refresh it; extensions installed from disk are never updated |
285+
286+
## Development
287+
288+
```bash
289+
pip install uv
290+
python scripts/vendor_wheels.py
291+
python scripts/build.py
292+
```
293+
294+
`vendor_wheels.py` resolves and downloads the wheels for every platform into `src/wheels/`, and
295+
`build.py` writes `dist/blender_ai-<version>.zip` with Blender's extension builder. It locates Blender
296+
automatically, or takes `--blender PATH` or the `BLENDER` environment variable. Passing `--download-url`
297+
also writes the `dist/index.json` repository listing that releases publish.
298+
299+
Tests: `pytest` covers the pure-Python parts and both SDKs against local stub servers;
300+
`blender -b --factory-startup --python tests/run_tools.py` exercises every tool; and
301+
`blender --enable-event-simulate --python tests/ui_interactions.py` drives the bar in a real window.
302+
[CONTRIBUTING.md](CONTRIBUTING.md) has the details, including how to run them in an empty profile, and
303+
[docs/architecture.md](docs/architecture.md) describes how the pieces fit together. Issues and pull
304+
requests are welcome.
305+
306+
## License
307+
308+
[GPL-3.0-or-later](LICENSE), as required for Blender extensions.

0 commit comments

Comments
 (0)