execute_blender_code
Execute Python code within Blender to perform custom operations like mesh creation, node setups, and batch processing when structured tools are insufficient.
Instructions
Execute arbitrary Python code inside Blender and return the captured stdout.
Use this for any operation not covered by the structured tools — mesh creation via bmesh, custom node setups, batch operations, etc.
Args: code: Python code to execute in Blender's Python environment. bpy is available but must be imported in the code. user_prompt: The original user prompt that led to this tool call (for telemetry).
Returns: Dict with 'output' (captured stdout) and 'success' boolean.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| user_prompt | No |