Houdini 20.5 hapi

hapi.getAssetDefinitionParmValues function

Fill arrays of parameter int values, float values, string values,

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. Note that only default values are retrieved.

This does require hapi.loadAssetLibraryFromFile to be called prior, in order to load the asset library and acquire library_id. hapi.getAssetDefinitionParmCounts should be called prior to acquire the counts for the sizes of the values arrays.

Usage

getAssetDefinitionParmValues(session: hapi.Session, library_id: int, asset_name: str, int_start: int, int_length: int, float_start: int, float_length: int, string_evaluate: bool, string_start: int, string_length: int, choice_start: int, choice_length: int) → (list of int, list of float, list of int, list of hapi.ParmChoiceInfo)

Fill arrays of parameter int values, float values, string values, and choice values for parameters in the specified asset in the specified asset library.

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.

int_start

First index of range for int_values_array. Must be at least 0 and at most int_value_count - 1 acquired from hapi.getAssetDefinitionParmCounts.

int_length

Must be at least 0 and at most int_value_count - int_start acquired from hapi.getAssetDefinitionParmCounts.

float_start

First index of range for float_values_array. Must be at least 0 and at most float_value_count - 1 acquired from hapi.getAssetDefinitionParmCounts.

float_length

Must be at least 0 and at most float_value_count - float_start acquired from hapi.getAssetDefinitionParmCounts.

string_evaluate

Whether or not to evaluate the string expressions. For example, the string “$F” would evaluate to the current frame number. So, passing in evaluate = False would give you back the string “$F” and passing in evaluate = True would give you back “1” (assuming the current frame is 1).

string_start

First index of range for string_values_array. Must be at least 0 and at most string_value_count - 1 acquired from hapi.getAssetDefinitionParmCounts.

string_length

Must be at least 0 and at most string_value_count - string_start acquired from hapi.getAssetDefinitionParmCounts.

choice_start

First index of range for choice_values_array. Must be at least 0 and at most choice_value_count - 1 acquired from hapi.getAssetDefinitionParmCounts.

choice_length

Must be at least 0 and at most choice_value_count - choice_start acquired from hapi.getAssetDefinitionParmCounts.

Returns a tuple of (int_values_array, float_values_array, string_values_array, choice_values_array).

hapi