Snippets Collections
# me - this DAT
# scriptOp - the OP which is cooking

# press 'Setup Parameters' in the OP to call this function to re-create the parameters.
def onSetupParameters(scriptOp):
	page = scriptOp.appendCustomPage('Parameters')
	p = page.appendInt('Par1', label='ParA')
	p = page.appendFloat('Par2', label='ParB')
# called whenever custom pulse parameter is pushed
def onPulse(par):

def onCook(scriptOp):
	#Declare Variables
	samples = scriptOp.par.Samples

	# Assign Samples to CHOP
	scriptOp.numSamples = samples

	#Calculate Step Size

	# Append output channels
	tx = scriptOp.appendChan('tx')
	ty = scriptOp.appendChan('ty')
	tz = scriptOp.appendChan('tz')

	#Assign Value to channels Implementing the Parametric Equation

Mon Dec 21 2020 07:00:59 GMT+0000 (UTC)

#touchdesigner #python

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension