| name | externalize-operator |
| description | MUST READ before calling externalize_op or save_externalization. Required workflow steps. |
Externalize Operator Workflow
Tagging (includes save)
externalize_op tags the operator AND writes it to disk in one step (it calls Update() internally). No separate save is needed.
- Tag and externalize:
externalize_op on the operator (auto-detects type if omitted)
- Verify:
get_externalization_status to confirm dirty state and file path
- Inspect: Verify file exists in
embody/ via file inspection
Re-exporting After Changes
save_externalization force re-exports an already-externalized operator. Use it after modifying an operator in TD when you need to update its file on disk.
Creating Python Files for TouchDesigner
When creating Python files (scripts, extensions, test files, callbacks):
- Create the textDAT in TouchDesigner first (via MCP
create_op or in TD UI)
- Write the Python code into the DAT (via MCP
set_dat_content)
- Tag the DAT for externalization (
externalize_op) — Embody writes the .py file to disk
NEVER manually set the file and syncfile parameters — Embody handles all file path management.
Exporting a Portable Tox
Export any COMP as a self-contained .tox with all Embody metadata stripped:
- Via MCP:
execute_python with op.Embody.ExportPortableTox(target=op('/path/to/comp'), save_path='/output/path.tox')