Houdini Engine 3.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Presets

Functions

HAPI_DECL HAPI_GetPresetBufLength (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PresetType preset_type, const char *preset_name, int *buffer_length)
 Generate a preset blob of the current state of all the parameter values, cache it, and return its size in bytes. More...
 
HAPI_DECL HAPI_GetPreset (const HAPI_Session *session, HAPI_NodeId node_id, char *buffer, int buffer_length)
 Generates a preset for the given asset. More...
 
HAPI_DECL HAPI_SetPreset (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PresetType preset_type, const char *preset_name, const char *buffer, int buffer_length)
 Sets a particular asset to a given preset. More...
 

Detailed Description

Functions for working with Node presets

Function Documentation

HAPI_DECL HAPI_GetPreset ( const HAPI_Session session,
HAPI_NodeId  node_id,
char *  buffer,
int  buffer_length 
)

Generates a preset for the given asset.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe exposed node id.
[out]bufferBuffer to hold the preset data.
[in]buffer_lengthSize of the buffer. Should be the same as the length returned by HAPI_GetPresetBufLength().
HAPI_DECL HAPI_GetPresetBufLength ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PresetType  preset_type,
const char *  preset_name,
int *  buffer_length 
)

Generate a preset blob of the current state of all the parameter values, cache it, and return its size in bytes.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe exposed node id.
[in]preset_typeThe preset type.
[in]preset_nameOptional. This is only used if the preset_type is HAPI_PRESETTYPE_IDX. If NULL is given, the preset name will be the same as the name of the node with the given node_id.
[out]buffer_lengthSize of the buffer.
HAPI_DECL HAPI_SetPreset ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PresetType  preset_type,
const char *  preset_name,
const char *  buffer,
int  buffer_length 
)

Sets a particular asset to a given preset.

Parameters
[in]sessionThe session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]node_idThe exposed node id.
[in]preset_typeThe preset type.
[in]preset_nameOptional. This is only used if the preset_type is HAPI_PRESETTYPE_IDX. If NULL is give, the first preset in the IDX file will be chosen.
[in]bufferBuffer to hold the preset data.
[in]buffer_lengthSize of the buffer.