David Pekarek
davpe
About Me
Connect
LOCATION
Not Specified
ウェブサイト
Houdini Engine
Availability
Not Specified
Recent Forum Posts
Python - set callback for dynamically created parms 2025年4月9日4:14
Thanks Tomas, the first and the most obvious solution works. That was actually the first thing I tried and it was giving me error. I didn't realize the default script language is Hscript so it was needed to specifically set it to Python. Stupid but easy
Thanks.

Thanks.
Python - set callback for dynamically created parms 2025年4月8日11:46
Hey, I'm kida stuck on how to do this - in short, i've got a shelf tool that adds an ordered menu UI to selected nodes. And I need a callback when the selection changes in this menu. Easy with static UI, but I couldn't figure it out with dynamically created one. This is a simplified code:
This line is obviously a wrong syntax that crashes Houdini:
script_callback=hou.MenuParmTemplate.setScriptCallback(node.parm("select_texture_node"), print('pressed'))
Not sure how it should look to make it work. Docs not helping. ChatGPT was giving me BS on this one. Any hints?
thanks, D.
import hou node = hou.selectedNodes()[0] menu_items = ["aaa", "bbb", "ccc", ] if node.parm("select_texture_node") is None: ordered_menu_parm = hou.MenuParmTemplate( name="select_texture_node", label="Select Texture Node", menu_items=menu_items, script_callback=hou.MenuParmTemplate.setScriptCallback(node.parm("select_texture_node"), print('pressed')) ) new_parm_group = node.parmTemplateGroup() new_parm_group.addParmTemplate(ordered_menu_parm) node.setParmTemplateGroup(new_parm_group)
This line is obviously a wrong syntax that crashes Houdini:
script_callback=hou.MenuParmTemplate.setScriptCallback(node.parm("select_texture_node"), print('pressed'))
Not sure how it should look to make it work. Docs not helping. ChatGPT was giving me BS on this one. Any hints?
thanks, D.
How do I activate the heightfield draw mask node in 20.5? 2024年12月4日4:59
Mike_A
It seems to work fine here - Houdini 20.5.435 / Windows 10.
You're activating the mask state by hitting Enter while over the Scene view?
I'm on 20.5.370 - maybe it's got an update since then. When i drop the node i hit enter and can draw a shape, but mask remains empty no matter what i do. If i invert the mask, i get full mask. So there is some issue with a drawing getting translated into a mask. My workaround is to draw a poly shape, extrude it, and use Mask from geo instead.