execute_blender_code
Execute Python code inside Blender's secure sandbox to control 3D modeling, animation, and rendering using safe imports like bpy and mathutils.
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 | |||