Export externalized .tox tree (git-diffable)
export_externalized_treeExport a TouchDesigner COMP as a git-diffable externalized .tox tree. Each component becomes an individual .tox file, enabling per-node diffs in version control.
Instructions
Save a COMP as a git-diffable externalized .tox tree using TouchDesigner's 'save external' (COMP.saveExternalTox). Instead of one opaque binary, the component — and, with recurse=true, every descendant COMP — is written to its own .tox file on disk with its externaltox parameter pointed at that file, so a version-controlled project shows per-node diffs. Writes files under out_dir (destructive) and mutates the live COMP's externaltox pars. out_dir is passed to the TouchDesigner process, so it must be a path that process can write to.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Root .tox stem. Defaults to the last path segment of comp_path. | |
| out_dir | Yes | Local folder to write the externalized .tox tree into. Passed to TouchDesigner as the save target, so it must be reachable from the TD process's filesystem. | |
| recurse | No | When true, externalize every descendant COMP too (each becomes its own .tox file), so the whole subtree is git-diffable. When false, only the root COMP is externalized. | |
| comp_path | Yes | Full path of the COMP to externalize (its .tox is written to out_dir/<name>.tox). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comp | Yes | Echoed COMP path that was externalized. | |
| count | Yes | Number of COMPs externalized. | |
| recurse | Yes | Whether descendant COMPs were externalized too. | |
| root_tox | Yes | Absolute path of the root externalized .tox. | |
| warnings | Yes | ||
| externalized | Yes | Each COMP that now points at an external .tox file (node path → externaltox path). |