This is an old revision of the document!
Houdini Shortcut
Node View | |
show node view mini map | O |
show node property corner panel | P |
layout selected nicely | shift + L |
align selected | hold A and drag align direction |
duplicate selected | alt+drag selected |
cut connection | hold Y and drag line to cut |
netbox nodes (like node group in nuke) | shift+O |
subnet nodes (like a tiny world with inputs+outputs to outside) | shift+C |
node color palette | C |
create note | shift+P |
node group manager (like display layer in maya) | shift+Z |
move connection line | alt+click drag line middle |
- object merge node: like object teleporter for far links
- ref:
- 5 Ways to Organize your Network in Houdini 17.5 (IndiePixel3D) https://www.youtube.com/watch?v=w8yBoO-qvsk
Houdini Pipeline Development
- Python 3 and built-in PySide2
- houdini has its built-in qt library (PySide2), just import its own
from hutil.Qt import QtCore, QtGui, QtWidgets
- houdini lic type check
import hou lic = hou.licenseCategory() if lic == hou.licenseCategoryType.Apprentice or lic == hou.licenseCategoryType.ApprenticeHD or lic == hou.licenseCategoryType.Education: self.memoData['hda_ext'] = 'hdanc' elif lic == hou.licenseCategoryType.Indie: self.memoData['hda_ext'] = 'hdalc'
- core hou class
- hou.HDADefinition (https://www.sidefx.com/docs/houdini/hom/hou/HDADefinition.html)
cur_def.libraryFilePath() # get file path cur_def.version() cur_def.description() cur_def.comment() # user # set cur_def.setVersion('2.1') cur_def.setDescription(description) cur_def.setComment('update details') # user # --- check node.type().definition() is None # check if current node is hda node.matchesCurrentDefinition() # check whether the contents of the node are locked to its type definition # --- action node.allowEditingOfContents() # unlock node (Allow Editing of Contents) node.type().definition().updateFromNode(node) # save the contents of an unlocked node to the definition (Save Operator Type) node.matchCurrentDefinition() # reload defition (Match Current Definition )
- detect selected hda node info
import hou if len(hou.selectedNodes()) == 1: node = hou.selectedNodes()[0] if node.type().definition() is not None: hda_file_path = node.type().definition().libraryFilePath() print(hda_file_path) definitions = hou.hda.definitionsInFile(hda_file_path) print(definitions) for d in definitions: print(str(node) + " name: " + node.type().name() ) print(str(node) + " version: " + d.version()) print(str(node) + " description: " + d.description()) print(str(node) + " comment: " + d.comment()) print(str(node) + " path: " + node.type().definition().libraryFilePath()) else: print("Selected node is not a HDA") else: print("Please select 1 hda node")
HDA Operation (Houdini Digital Asset)
- HDA = houdini digital asset
- a set of node network functions as a core process
- like model asset but instead of geo, it can be anything, like shading network, rig network or anything process.
- once you add hda path into your houdini env, you can load it from tab menu like rest built-in hda asset (like nuke gizmo)
- each hda is like a programming class, it has its unique type name like class name, all node of its class are instance of the node definition (its original content network)
- once a instance of hda in the scene, it is like maya model reference, you can unlock and make additional changes (Allow editing of contents),
- you can save the changes back into hda files (Save node type), or just keep changes in the scene
- to revert back to original state, just select node, use (Match current definition cmd)
- VHDA = versioned houdini digital asset
- ref: create your own videos https://vimeo.com/458751335
- Houdini default menu source code:
Houdini_VERSION\houdini\OPmenu.xml
- related hda menu code
#menu id: opmenu.create_hda kwargs["node"].canCreateDigitalAsset() #menu id: opmenu.vhda_options_create import hou import assettools node = kwargs["node"] if assettools.isSubnet(node): return 1 else: return 0 #menu id: opmenu.vhda_create import hou import assettools node = kwargs["node"] assettools.createNewVHDAFromSubnet(node)
- Houdini python API library path:
Houdini_VERSION\houdini\python3.7libs\ #hda related files assettools.py
* check and remove HDA
# hda_file_path: the path of hda file cur_path = hda_file_path if os.path.isfile(cur_path): # uninstall for safe definitions = hou.hda.definitionsInFile(cur_path) is_installed = 0 for d in definitions: if d.isInstalled(): is_installed = 1 if is_installed: # Uninstall the HDA hou.hda.uninstallFile(cur_path) # remove action # os.remove(cur_path)
Tutorial
- [Houdini official] Houdini Digital Assets | 1. Introduction to HDAs (2021)