blender_python_exec_async
Run long Blender Python scripts asynchronously to avoid blocking the UI. Returns a job ID for polling and supports headless background execution.
Instructions
Start a long-running Python script in Blender asynchronously. Same parameters as blender_python_exec. Returns a job_id immediately. Use blender_job_status to poll for completion, and blender_job_cancel to abort. The script can check 'cancel_event.is_set()' to detect cancellation. Ideal for fluid baking, rigid body simulation, or heavy scene generation. Note: bridge jobs run on Blender's main thread, so the Blender UI is busy while they run. Use transport='headless' to run the job in a separate background Blender process instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| args | No | ||
| code | No | ||
| transport | No | bridge | |
| blend_file | No | ||
| script_path | No | ||
| factory_startup | No | ||
| timeout_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |