graphic:python:houdini

This is an old revision of the document!


Houdini Shortcut

Node View
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

Houdini Pipeline Development

  • Python 3 and built-in PySide2
  • 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 )

HDA Operation (Houdini Digital Asset)

  • Houdini default menu source code:
    Houdini_VERSION\houdini\OPmenu.xml
  • Houdini python API library path:
    Houdini_VERSION\houdini\python3.7libs\
  • graphic/python/houdini.1668589116.txt.gz
  • Last modified: 2022/11/16 08:58
  • by ying