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.
baseCOMP base_<x>— name it now; binding and docked refs snapshot at creation.textDAT <Name>inside — DAT = module = class, one identifier (e.g.SimpleExt).set_dat_contentthe Skeleton (below) →code/py/<comp-path>/<Name>.py.language=python— set it explicitly;set_dat_contentdoesn't (see Sync to File).ext0object = op('./<Name>').module.<Name>(me)+ext0promote=True— leaveext0nameempty (promoted under the class name).ext0always exists → no sequence management.- pulse
reinitextensions. - Gate — not done until proven:
get_errorsclean AND a promoted member called from outside returns a value (op('base_<x>').Hello()). Print it.