execute_blender_code
Execute Python code in Blender with shared context for persistent workflow across multiple steps.
Instructions
Execute arbitrary Python code in Blender. Make sure to do it step-by-step by breaking it into smaller chunks.
Now includes shared context between executions! You can use:
- shared['variable_name'] = value # Store variables for later use
- get_object('handle_name') # Get stored object references
- get_material('handle_name') # Get stored material references
- store_object('handle', 'obj_name') # Store object reference
- store_material('handle', 'mat_name') # Store material reference
Parameters:
- code: The Python code to execute
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "execute_blender_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes |