Patricio Vazquez Barba
p.vazquez
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
HDAs Changing script language from Hscript to Python June 6, 2025, 5:44 p.m.
Solved it, just needed to include: as seen on the documentation.
So now it's just:
setExtraFileOption(name, value, type_hint = hou.fieldType::NoSuchField)
So now it's just:
hda_def.addSection("PythonModule", str(scriptPA)) hda_def.setExtraFileOption('PythonModule/IsPython', True) hda_def.addSection("OnCreated", str(scriptOC)) hda_def.setExtraFileOption('OnCreated/IsPython', True)
HDAs Changing script language from Hscript to Python June 4, 2025, 6:16 p.m.
Hello, been working on automating some HDAs parameters creation using the following python script:
What I want to include is to make sure the scripting language on the Edit Operator Type Properties menu > scripts > Edit as dropdown changes from Hscript to Python, does anybody know how to do that?
import hou def python_module_script(): pythonScript1 = 'def onCreated(node):\n node.setColor(hou.Color((0.0, 0.0, 0.0)))\n node.setUserData("nodeshape", "diamond")' pythonScript2 = 'kwargs["node"].hdaModule().onCreated(kwargs["node"]);' return pythonScript1, pythonScript2 hda_node = subnet.createDigitalAsset( name=hda_name, hda_file_name=hdalib_dic + hda_name + ".hda", description=hda_name, min_num_inputs=0, max_num_inputs=0, install_path=hdalib_dic, ignore_external_references=True, create_backup=True, ) hda_node.setName(hda_name) hda_def = hda_node.type().definition() scriptPM, scriptOC = python_module_scripts() hda_def.addSection("PythonModule", str(scriptPM)) hda_def.addSection("OnCreated", str(scriptOC))
What I want to include is to make sure the scripting language on the Edit Operator Type Properties menu > scripts > Edit as dropdown changes from Hscript to Python, does anybody know how to do that?