Hi all! I'm trying to save HDA's that are specific to a project, within the $JOB file structure. But I've run into some trouble where they don't seem to be loading. In the docs it says that it should work, but it seems that Houdini isn't loading the HDA's from the Job/HDA folder
Docs… [sidefx.com] You can put assets specific to a project in $JOB/hda. See project management for how to set up $JOB
Any ideas what I'm doing wrong there? Thanks, Pete
It sort of works, but you have to name the folder $JOB/otls Then you have to set the project, save your file and reopen it. It's probably easier to create a simple package now...
The Script needs to be copy paste in: Windows -> Python Source Editor
The original script will create a error (at least for me).
Here the adaptation of it which worked for me: NOTE: depending on the license version of your files you need to adapt the filetypes. Also in the $JOB directory there needs to be a "otls" folder containing your assets (no subfolders)
importhouimportos.pathdefloadHdaLibrary(libPath):""" Loads all the HDA files in a folder @param libPath: HDA library file path """ifnotos.path.isdir(libPath):print(libPath)returnloaded_files=hou.hda.loadedFiles()# Get all the .otl files in the directory.filetypes=['.otllc','.otl','.hdalc','.hda']otl_files=[fforfinos.listdir(libPath)ifos.path.splitext(f)[1]infiletypes]forotl_pathinotl_files:# backslashes are the devils workfull_path=os.path.join(libPath,otl_path).replace('\\','/')# If the file isn't already loaded, install it.iffull_pathnotinloaded_files:#print 'installing', full_pathhou.hda.installFile(full_path)loadHdaLibrary(hou.getenv('JOB')+'/otls')