run_python
Execute Python code or a .py file inside a running Blender session using bpy, bmesh and math, then retrieve stdout, stderr and any assigned result value.
Instructions
Run Python in Blender (bpy, bmesh, math imported): code or a .py file; stdout, stderr and any result you assign come back.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "run_python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | No | blender | |
| code | No | ||
| file | No | ||
| return_locals | No |