A powerful Blender addon that uses Claude AI to generate 3D models from text prompts. The addon features a multi-agent system where one agent interprets and plans your request, and another generates executable Blender Python code.
-
Two-Agent System:
- Planning Agent: Interprets your prompt and breaks it down into actionable steps
- Code Generation Agent: Generates clean, executable Blender Python code
-
Multi-threaded: Non-blocking async operations keep Blender responsive
-
Real-time Status: See what's happening at each stage
-
Error Handling: Comprehensive error reporting and recovery
-
Claude Integration: Uses Anthropic's Claude API for intelligent code generation
- Anthropic API Key: Get your API key from Anthropic Console
- httpx Library: The addon requires the
httpxlibrary in Blender's Python environment - h2 Library (Optional): Installing
h2enables HTTP/2 support for better performance, but the addon will work without it using HTTP/1.1
Blender uses its own Python interpreter. To install httpx:
-
Find Blender's Python executable:
- Windows: Usually in
C:\Program Files\Blender Foundation\Blender [version]\[version]\python\bin\python.exe - macOS: Right-click Blender.app → Show Package Contents →
Contents/Resources/[version]/python/bin/python3 - Linux: Usually
/usr/bin/blenderor check withwhich blender
- Windows: Usually in
-
Install httpx (required):
# Windows "C:\Program Files\Blender Foundation\Blender 3.6\3.6\python\bin\python.exe" -m pip install httpx # macOS/Linux /path/to/blender/python/bin/python3 -m pip install httpx
-
Install h2 (optional, for HTTP/2 support):
# Windows "C:\Program Files\Blender Foundation\Blender 3.6\3.6\python\bin\python.exe" -m pip install h2 # macOS/Linux /path/to/blender/python/bin/python3 -m pip install h2
Or use Blender's bundled pip:
# Required blender --python-expr "import subprocess; subprocess.check_call(['python', '-m', 'pip', 'install', 'httpx'])" # Optional (for better performance) blender --python-expr "import subprocess; subprocess.check_call(['python', '-m', 'pip', 'install', 'h2'])"
-
Copy the
blender_addonfolder to Blender's addons directory:- Windows:
%APPDATA%\Blender Foundation\Blender\[version]\scripts\addons\ - macOS:
~/Library/Application Support/Blender/[version]/scripts/addons/ - Linux:
~/.config/blender/[version]/scripts/addons/
- Windows:
-
Or install via Blender:
- Edit → Preferences → Add-ons → Install...
- Select the
blender_addonfolder
-
Enable the addon in Preferences → Add-ons → Search "LLM Blender Assistant"
- Open Blender Preferences (Edit → Preferences)
- Go to Add-ons → LLM Blender Assistant
- Click on the addon name to expand settings
- Enter your Anthropic API Key
- (Optional) Change the Claude model (default:
claude-3-5-sonnet-20241022)
- Open Blender
- In the 3D Viewport, open the sidebar (press
Nif hidden) - Go to the "LLM Assistant" tab
- Enter your prompt describing what you want to create
- Example: "Create a red cube with a metallic material"
- Example: "Make a sphere with a glass material and add a light"
- Example: "Create a simple house with a roof, walls, and a door"
- Click "Generate Model"
- Watch the status as the agents work:
- Planning: The planning agent analyzes your request
- Generating: The code agent creates Blender Python code
- Executing: The code runs in Blender
- Complete: Your model is ready!
- User Input: You type a natural language prompt
- Planning Agent: Claude analyzes the prompt and creates a structured plan with steps
- Code Generation Agent: Claude generates executable Blender Python code based on the plan
- Execution: The code runs safely in Blender's Python environment
- Result: Your 3D model appears in the viewport!
- "Create a simple cube with a red material"
- "Make a sphere with a glass material"
- "Create a torus with a metallic blue material"
- "Make a cylinder and add a subdivision surface modifier"
- "Create a simple house with walls, roof, and a door"
- "Generate a low-poly tree"
- "Create a donut with icing"
- Set your Anthropic API key in Addon Preferences
- Install httpx in Blender's Python environment (see Installation section)
- The addon now automatically falls back to HTTP/1.1 if h2 is not installed
- If you want HTTP/2 support for better performance, install h2:
python -m pip install h2
- Check the error message in the status panel
- Try rephrasing your prompt more clearly
- Some complex requests may need multiple attempts
- Make sure the addon is enabled in Preferences → Add-ons
- Check that all files are in the correct location
- Restart Blender
- Python Version: Compatible with Blender 3.0+ (Python 3.9+)
- API: Uses Anthropic Claude API (Messages API)
- Threading: Uses asyncio and threading for non-blocking operations
- Code Execution: Safe execution environment with proper error handling
This addon is provided as-is for educational and development purposes.
Feel free to improve the prompts, add features, or fix bugs!