Option to trigger a python function directly from a pulse parameter

being able to directly call a function from a pulse parameter would be a great time saver. We could have an extra field in the parameter dialog editor called “python execute”.

Having to go between the parameter editor and a parameter execute DAT begins to feel like a lot of double work.

I know I can just do something like this:

def onPulse(par):
	method = getattr(parent(), par.name)
	method()

But then I need to start naming all my functions without camel case, which doesn’t feel quite right.

Or this :innocent:

Other option would be to just allow custom fields per parameter.

1 Like

Guess this is the closest I’ll get currently without hijacking fields

I have requested this as well, but got no traction. I will keep lobbying for it when the opportunity arises. For now, by-name functions in your extension is the way to go.

3 Likes

call_methods_from_pulse.tox (1006 Bytes)

In the mean time, I’ll probably stick with something like this, but yeah, just having that field in the editor would be amazing.