Houdini 20.5 hapi

hapi.setPreset function

Sets a particular asset to a given preset.

Usage

setPreset(session: hapi.Session, node_id: int, preset_type: hapi.presetType, preset_name: str, buffer: str, buffer_length: int) → bool

Sets a particular asset to a given preset.

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.

node_id

The exposed node id.

preset_type

The preset type.

preset_name

Optional. This is only used if the preset_type is hapi.presetType.Idx. If None is give, the first preset in the IDX file will be chosen.

buffer

Buffer to hold the preset data.

buffer_length

Size of the buffer.

hapi