Update Default Extension

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.


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):

	def PromotedFunction(self, v):

Hey @alphamoonbase,

long click/hold on the “Add” button in the Component Editor will let you choose between “Standard” and “Empty” extension. I guess a preference for this would be nice?



Uh, that is interresting. I was under the assumption that it was simply gone (if i remember correctly that menu popped up per default).
I have to say, longpress in a mouse/keyboard environment is kinda unusual. being more a TouchInput. Might be better to replace (or add) this as a rightclick and maybe adding a little info to emphasize that this has a rightclick. But getting in to UI overhaul territory here :slight_smile:

But anyway, that helps already in regard to empty Extensions, merci!