Hi All,
I'm trying to add a button to my character's HDA that runs a python script but I can't figure out how to get it working. It works fine as a toolbar script.
Im not sure whether to store the script on the disk and access that somehow, or if there's a way to bake the script into the HDA.
Can someone give me a little help getting started with this?
Thanks,
Pete
Running a script from a button on a HDA
10518 3 1- peteski
- Member
- 517 posts
- Joined: Dec. 2013
- Offline
- tamte
- Member
- 8449 posts
- Joined: July 2007
- Online
you can define your script in Scripts section on your HDA (Type Properties…)
https://www.sidefx.com/docs/houdini/ref/windows/optype#scripts [sidefx.com]
and you can use parameter callback to refer to it, then any time your parameter is changed (like button pressed) it will run the script
https://www.sidefx.com/docs/houdini/hom/locations#parameter_callback_scripts [sidefx.com]
you can as well pass kwargs dictionary to the called function so that you have access to important data like node or parm it was called from etc.
here is a quick example:
https://www.sidefx.com/docs/houdini/ref/windows/optype#scripts [sidefx.com]
and you can use parameter callback to refer to it, then any time your parameter is changed (like button pressed) it will run the script
https://www.sidefx.com/docs/houdini/hom/locations#parameter_callback_scripts [sidefx.com]
you can as well pass kwargs dictionary to the called function so that you have access to important data like node or parm it was called from etc.
here is a quick example:
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- peteski
- Member
- 517 posts
- Joined: Dec. 2013
- Offline
- peteski
- Member
- 517 posts
- Joined: Dec. 2013
- Offline
-
- Quick Links