1.使用edit parameter interface?添加参数
2.vex?chf chi chramp
3.使用Python
Houdini 18.5 ?- Python scripting
在参数面板中用python添加参数?列表与使用
1.定位到要添加的节点?nd = hou.node("/obj/geo1/python2")
2.创建响应事件函数
?btncbk = """
print("hello")
"""
3.创建按键
bt = hou.ButtonParmTemplate("btn5","btn5",script_callback = btncbk,script_callback_language=hou.scriptLanguage.Python)
4.添加到面板中
nd.addSpareParmTuple(bt)?
fl = hou.FloatParmTemplate("float5","floa2",4)
nd.addSpareParmTuple(fl)
tp = node.parms()
for i in tp:
? ? print(i.eval())
tp = node.parmTuples()
for i in tp:
? ? print(i.eval())
建立文件夹页框
?
参考:
Customising Houdini Nodes [Part 3]: Modifying The UI
Houdini 自定义节点参数面板 hou.ParmTemplate学习笔记
button_callback = """from pipeline.houdini import tools tools.open_parm_in_mplay(kwargs["node"].parm("vm_picture"))"""
button_parm = hou.ButtonParmTemplate( "show_in_mplay", "Show in MPlay", script_callback=button_callback, script_callback_language= hou.scriptLanguage.Python)