Note that you must call hapi.renderTextureToImage first for this method call to make sense.
Also note that you must call hapi.extractImageToMemory first in order to perform the extraction and get the extracted image buffer size that you need to know how much memory to allocated to fit your extracted image.
Usage ¶
getImageMemoryBuffer(session
: hapi.Session, material_node_id
: int
, length
: int
) → list
of str
Fill your allocated buffer with the just extracted image buffer.
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.
material_node_id
The material node id.
length
Sanity check. This size should be the same as the size allocated for the buffer passed in and should be at least as large as the buffer_size returned by the call to hapi.extractImageToMemory.
Returns buffer as a list
of str
.