Houdini 20.0 hapi

hapi.getAvailableAssets function

Get the names of the assets contained in an asset library.

The asset names will contain additional information about the type of asset, namespace, and version, along with the actual asset name. For example, if you have an Object type asset, in the “hapi” namespace, of version 2.0, named “foo”, the asset name returned here will be: hapi::Object/foo::2.0

However, you should not need to worry about this detail. Just pass this string directly to hapi.createNode to create the node. You can then get the pretty name using hapi.getAssetInfo.

You should call hapi.loadAssetLibraryFromFile prior to get a library_id. Then, you should call hapi.getAvailableAssetCount to get the number of assets to know how large of a string handles array you need to allocate.


getAvailableAssets(session: hapi.Session, library_id: int, asset_count: int) → list of int

Get the names of the assets contained in an asset library.


The session of Houdini you are interacting with. See hapi.Session for more on sessions. Pass None to just use the default in-process session.



Should be the same or less than the value returned by hapi.getAvailableAssetCount.

Returns asset_names_array as a list of int.