When it comes to managing HDAs, ideally we'd like to:
- have them installed for the current Houdini session rather than for the current HIP scene.
- make sure that opening scenes install any required HDA.
We can mostly achieve that but we are running into issues where we are seeing scenes with nodes pointing to “Embedded” definitions, and we would like to try understanding where it's coming from.
This might not be the whole story but I came up with a small repro that could start explaining some of it.
To illustrate this, let's assume that we have an HDA available on disk in a location that is not scanned by Houdini on startup (e.g.:
/tmp/mr_piggy.hda
). Now, let's go through these few steps:- open a new Houdini session with an empty scene.
- install the HDA using
hou.hda.installFile("/tmp/mr_piggy.hda", oplibraries_file="Scanned Asset Library Directories")
. - create an instance of that node.
- save the scene.
- close Houdini.
- open a new Houdini session.
- reopen the saved scene.
Upon installing the HDA in step 2, it gets listed under the “Scanned Asset Library Directories” section from the Asset Manager, as expected.
Upon reopening the saved scene in step 7, the HDA gets installed and the correct definition is picked. However, this time the HDA is installed under the “Fallback Libraries” section, with an embedded definition also installed within the “Current HIP File” section. And an “Embedded” definition is now listed within the list of asset paths available to the node instance, although it didn't seem to be active in my tests.
I still don't know what are the additional steps required to have these node instances pointing to the “Embedded” definition instead of the expected one (assuming that artists don't do it manually), but I think that it could be helpful if we could figure out how to make sure that no such “Embedded” definition gets installed.
Any suggestion?
Thank you!