Execute Python in TouchDesigner
execute_python_scriptRun Python code directly inside TouchDesigner for operations not covered by structured tools. Captures script output for inspection.
Instructions
Escape hatch — run an arbitrary Python script inside the TouchDesigner process. Prefer the structured tools (find_td_nodes, get_td_node_parameters, update_td_node_parameters, summarize_td_errors, snapshot_td_graph, …); reach for this only when no structured tool can express the operation. Code runs in TD only, never on the local machine.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | Python source to execute inside TouchDesigner (runs in the TD process, not locally). | |
| return_output | No | Capture stdout / the value of the last expression and return it. |