|
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...
|
|
HAPI_DECL | HAPI_GetPresetCount (const HAPI_Session *session, const char *buffer, int buffer_length, int *count) |
| Gets the number of presets in an IDX file. When this method is called, the names of the presets are stored in a single internal buffer from which they can be retrieved by calling HAPI_GetPresetNames(). More...
|
|
HAPI_DECL | HAPI_GetPresetNames (const HAPI_Session *session, const char *buffer, int buffer_length, HAPI_StringHandle *preset_names_array, int count) |
| Gets the names of presets in an IDX file. HAPI_GetPresetCount() must be called before calling this method. See the HAPI_GetPresetCount() documentation for more information. More...
|
|
Functions for working with Node presets
Generates a preset for the given asset.
- Parameters
-
[in] | session | The 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_id | The exposed node id. |
[out] | buffer | Buffer to hold the preset data. |
[in] | buffer_length | Size of the buffer. Should be the same as the length returned by HAPI_GetPresetBufLength(). |
Generate a preset blob of the current state of all the parameter values, cache it, and return its size in bytes.
- Parameters
-
[in] | session | The 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_id | The exposed node id. |
[in] | preset_type | The preset type. |
[in] | preset_name | Optional. 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_length | Size of the buffer. |
HAPI_DECL HAPI_GetPresetCount |
( |
const HAPI_Session * |
session, |
|
|
const char * |
buffer, |
|
|
int |
buffer_length, |
|
|
int * |
count |
|
) |
| |
Gets the number of presets in an IDX file. When this method is called, the names of the presets are stored in a single internal buffer from which they can be retrieved by calling HAPI_GetPresetNames().
Note that calling HAPI_GetPresetCount() will overwrite the preset names that were previously stored in the internal buffer. Therefore, ensure that you have called HAPI_GetPresetNames() before calling HAPI_GetPresetCount() again.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | buffer | A buffer containing the raw binary data of the .idx file. |
[in] | buffer_length | Size of the buffer. |
[out] | count | Number of presets in the file. |
Gets the names of presets in an IDX file. HAPI_GetPresetCount() must be called before calling this method. See the HAPI_GetPresetCount() documentation for more information.
- Parameters
-
[in] | session | The session of Houdini you are interacting with. See Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | buffer | A buffer containing the raw binary data of the .idx file. This should be the same buffer that was passed into HAPI_GetPresetCount(). |
[in] | buffer_length | Size of the buffer. |
[out] | preset_names_array | Array of preset names to be filled |
[in] | count | Number of presets in the file. Should be the same as the count returned by HAPI_GetPresetCount() |
Sets a particular asset to a given preset.
- Parameters
-
[in] | session | The 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_id | The exposed node id. |
[in] | preset_type | The preset type. |
[in] | preset_name | Optional. 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] | buffer | Buffer to hold the preset data. |
[in] | buffer_length | Size of the buffer. |