kuba
Jan. 15, 2008 18:18:25
Hi everyone,
A quick python related question. What is the equivalent of opparm -c in python? I am getting an error while using hou.Parm.pressButton method. Not sure how do I specify a path to the parameter in this method. Any help is really appreciated.
thanks
kuba
graham
Jan. 15, 2008 18:21:23
A hou.Parm object takes a path to a parameter on a node.
On something like a file sop, you can do:
hou.parm('/obj/geo1/file1/reload').pressButton()
or
hou.node('/obj/geo1/file1').parm('reload').pressButton()
kuba
Jan. 15, 2008 18:49:28
Thanks will find in a second,
btw, I found not so elegant solution for that:
hou.hscript('opparm -c /out/mantra testA execute')
Cheers
kuba
pelos
Aug. 17, 2012 18:24:33
nice trick
coclea
Aug. 1, 2025 18:59:14
## nodes serial kicker
selectedNodes = hou.selectedNodes()
for sel in selectedNodes:
node.parm('execute').pressButton()
Fenolis
Aug. 4, 2025 12:28:41
@coclea I believe you meant to have the second line be:
for node in selectedNodes: