All scriptOp's seem to acting weird

Hello!

I am still very new to Touchdesigner, but for me, the script op’s seem to be somehow bugged:

The callbackstates are often defined on different names in op-snippets than they’re on the help pages and pressing the setup button in snippets makes customPages disappear. I managed to get them back, by noticing that if you want to make a custom parameter, it has to have a capital in the beginning, but ONLY in the beginning of the parameter name. I also managed to define minimum and maximum values for the said parameters, but not for example a default value…

I haven’t yet found a succesful way to make a pulse button.¨

I’m on win10, 64-Bit Build 2020.22080

Toni.

Hi @tonirandell, welcome to the forum!

Script ops are a little strange to get used to.

If you’re thinking about using custom parameters on this ops it’s worth looking at the article about custom pars:
https://docs.derivative.ca/Custom_parameters

Name space for custom pars is based on a convention of starting with an uppercase letter, no spaces, and no other capitals. This differs from the parameter convention for built - in pars, and helps make sure you’re not going to collide with the name space that the Derivative team uses.

And the documentation about the par class:

This is the syntax go create a pulse button:

def onSetupParameters(scriptOp):
	page = scriptOp.appendCustomPage('Custom')
	p = page.appendPulse("Mypulseval", label="My Pulse Val")
	return
1 Like

I think this is because some of the op snippets are from previous builds where the cook method has been named differently.

1 Like

Okay! Thanks for the answers!