Hi,
Does anyone know how I can get current parm on Callback Script? Doesn't look hou.evaluatingParm() works on Callback. And I don't wanna specify the parameter name like hou.pdw().parm(“something”)
for example, I just want to print current value whenever the parameter changed or printing button name when I press the button.
Thanks,
Ryoji
Callback Script and Current Parm
12233 3 1- ryoji
- Member
- 19 posts
- Joined: Sept. 2011
- Offline
- Enivob
- Member
- 2625 posts
- Joined: June 2008
- Offline
This works for me.
Here is the callback code. Remember to switch from Hscript to Python.
def btnClick (passedData): n = hou.node("/obj/pythonscript1") if n: p = n.parm("btn_example") print dir(p) print p.name() print p.description() # This is the button caption.
Here is the callback code. Remember to switch from Hscript to Python.
exec(hou.node("/obj/pythonscript1").parm('python').eval());btnClick("")
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
- friedasparagus
- Member
- 402 posts
- Joined: June 2014
- Offline
Hi,
you should be able to get what you need from the kwargs dictionary, you can check out the docs on that stuff here [www.sidefx.com]
you should be able to get what you need from the kwargs dictionary, you can check out the docs on that stuff here [www.sidefx.com]
Henry Dean
- ryoji
- Member
- 19 posts
- Joined: Sept. 2011
- Offline
-
- Quick Links