td-python-extension

Installation
SKILL.md

Python Extensions

Patterns for Python extension components in TouchDesigner. Complements td-comp-architecture (structure/custom pars) and td-dat-family (callback mechanics). See reference.md for API signatures and examples.md for complete patterns.

Create an extension — one pass

The fixed choreography. Author the class (step 3) and verify (step 7); the rest is invariant. Mirrors what TD's own Component Editor produces.

  1. baseCOMP base_<x> — name it now; binding and docked refs snapshot at creation.
  2. textDAT <Name> inside — DAT = module = class, one identifier (e.g. SimpleExt).
  3. set_dat_content the Skeleton (below) → code/py/<comp-path>/<Name>.py.
  4. language=python — set it explicitly; set_dat_content doesn't (see Sync to File).
  5. ext0object = op('./<Name>').module.<Name>(me) + ext0promote=True — leave ext0name empty (promoted under the class name). ext0 always exists → no sequence management.
  6. pulse reinitextensions.
  7. Gate — not done until proven: get_errors clean AND a promoted member called from outside returns a value (op('base_<x>').Hello()). Print it.
Installs
2
GitHub Stars
32
First Seen
Oct 8, 2026