Houdini 20.5 hapi

hapi.setHeightFieldData function

Set the height field data for a terrain volume with the values from

Usage

setHeightFieldData(session: hapi.Session, node_id: int, part_id: int, name: str, values_array: list of float, start: int, length: int) → bool

Set the height field data for a terrain volume with the values from a flattened 2D array of float. hapi.setVolumeInfo should be called first to make sure that the volume and its info are initialized.

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 node id.

part_id

The part id.

name

The name of the volume used for the heightfield. If set to “height” the values will be used for height information, if not, the data will used as a mask.

values_array

Heightfield flattened array. Should be at least the size of start + length.

start

The start at least 0 and at most ( hapi.VolumeInfo.xLength * hapi.VolumeInfo.yLength ) - length.

length

The length should be at least 1 or at most ( hapi.VolumeInfo.xLength * hapi.VolumeInfo.yLength ) - start.

hapi