The default extension that is created when adding a new extension is using out of date examples.
Also (personaly) would be nice to get back the possibility to create an empty extension.
Example:
"""
Extension classes enhance TouchDesigner components with python. An
extension is accessed via ext.ExtensionClassName from any operator
within the extended component. If the extension is promoted via its
Promote Extension parameter, all its attributes with capitalized names
can be accessed externally, e.g. op('yourComp').PromotedFunction().
Help: https://docs.derivative.ca/Extensions
"""
class extTest:
"""
extTest description
"""
def __init__(self, ownerComp):
# The component to which this extension is attached
self.ownerComp = ownerComp
# attributes:
self.a = 0 # attribute
self.B = 1 # promoted attribute
# dependable attrbiute
self.C = tdu.Dependency( 3 )
def myFunction(self, v):
debug(v)
def PromotedFunction(self, v):
debug(v)