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
Saving HDA's to the job
2977 5 2- peteski
- Member
- 518 posts
- Joined: Dec. 2013
- Offline
- Enivob
- Member
- 2625 posts
- Joined: June 2008
- Offline
- peteski
- Member
- 518 posts
- Joined: Dec. 2013
- Offline
- TomVee
- Member
- 21 posts
- Joined: Oct. 2018
- Offline
- Mitzu_Ta
- Member
- 1 posts
- Joined: July 2023
- Offline
I was looking for a solution for this now for a while.
There is a Python script by Chris Gardner which will allow you to load the otls from your $JOB directory.
https://gist.github.com/chris-gardner/c9daf34a668c5dddda94b9f6276d8cb8 [gist.github.com]
Stumbled upon here: https://www.tokeru.com/cgwiki/HoudiniHDA [www.tokeru.com]
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)
There is a Python script by Chris Gardner which will allow you to load the otls from your $JOB directory.
https://gist.github.com/chris-gardner/c9daf34a668c5dddda94b9f6276d8cb8 [gist.github.com]
Stumbled upon here: https://www.tokeru.com/cgwiki/HoudiniHDA [www.tokeru.com]
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)
import hou import os.path def loadHdaLibrary(libPath): """ Loads all the HDA files in a folder @param libPath: HDA library file path """ if not os.path.isdir(libPath): print(libPath) return loaded_files = hou.hda.loadedFiles() # Get all the .otl files in the directory. filetypes = ['.otllc','.otl','.hdalc','.hda'] otl_files = [f for f in os.listdir(libPath) if os.path.splitext(f)[1] in filetypes] for otl_path in otl_files: # backslashes are the devils work full_path = os.path.join(libPath, otl_path).replace('\\', '/') # If the file isn't already loaded, install it. if full_path not in loaded_files: #print 'installing', full_path hou.hda.installFile(full_path) loadHdaLibrary(hou.getenv('JOB')+'/otls')
- peteski
- Member
- 518 posts
- Joined: Dec. 2013
- Offline
-
- Quick Links