検索 - User list
Full Version: Python callback to run every time any HDA parameter change
Root » Technical Discussion » Python callback to run every time any HDA parameter change
Patoz
Hello,
I am trying to find the best way to hook up a python callback to write the data from my HDA menu into a json file (a dictionary that stores all the data)

At the moment I have added for each parameter the same python callback in the callback script section:

hou.phm().export_json(kwargs)

although I find this a little, well, brutal???

Would there be a better way to do this you reckon?

Any advice would be great

Many thanks
tamte
You can probably register node event callback [www.sidefx.com] for each HDA instance to handle hou.nodeEventType.ParmTupleChanged

You likely want to add it during HDA's OnLoaded callback as the node event callbacks don't persist between sessions
Patoz
OH yep this works pretty well for me thanks a lot @tamte
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB