execute_blender_code
Run Python code inside Blender's sandboxed environment. Automate 3D modeling, animation, and rendering with secure execution of scripts.
Instructions
Execute Python code inside Blender's sandboxed environment.
The code runs in a restricted sandbox that blocks dangerous imports (os, subprocess, socket, etc.) and dangerous builtins (exec, eval, open). Safe Blender imports (bpy, bmesh, mathutils, math, json) are allowed.
Args: code: Python code to execute. bpy is available but must be imported.
Returns: Dict with 'output' (captured stdout) and 'success' boolean.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||