Houdini 20.5 hapi

hapi.getAssetDefinitionParmCounts function

Get the number of asset parameters contained in an asset

This does not create the asset in the session. Use this for faster querying of asset parameters compared to creating the asset node and querying the node’s parameters.

This does require hapi.loadAssetLibraryFromFile to be called prior, in order to load the asset library and acquire library_id. Then hapi.getAvailableAssetCount and hapi.getAvailableAssets should be called to get the asset_name.

Usage

getAssetDefinitionParmCounts(session: hapi.Session, library_id: int, asset_name: str) → (int, int, int, int, int)

Get the number of asset parameters contained in an asset library, as well as the number of parameter int, float, string, and choice values.

session

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.

library_id

asset_name

Name of the asset to get the parm counts for.

Returns a tuple of (parm_count, int_value_count, float_value_count, string_value_count, choice_value_count).

hapi