HDK
|
Functions | |
HAPI_DECL | HAPI_GetActiveCacheCount (const HAPI_Session *session, int *active_cache_count) |
Get the number of currently active caches. More... | |
HAPI_DECL | HAPI_GetActiveCacheNames (const HAPI_Session *session, HAPI_StringHandle *cache_names_array, int active_cache_count) |
Get the names of the currently active caches. More... | |
HAPI_DECL | HAPI_GetCacheProperty (const HAPI_Session *session, const char *cache_name, HAPI_CacheProperty cache_property, int *property_value) |
Lets you inspect specific properties of the different memory caches in the current Houdini context. More... | |
HAPI_DECL | HAPI_SetCacheProperty (const HAPI_Session *session, const char *cache_name, HAPI_CacheProperty cache_property, int property_value) |
Lets you modify specific properties of the different memory caches in the current Houdini context. This includes clearing caches, reducing their memory use, or changing how memory limits are respected by a cache. More... | |
HAPI_DECL | HAPI_SaveGeoToFile (const HAPI_Session *session, HAPI_NodeId node_id, const char *file_name) |
Saves a geometry to file. The type of file to save is to be determined by the extension ie. .bgeo, .obj. More... | |
HAPI_DECL | HAPI_LoadGeoFromFile (const HAPI_Session *session, HAPI_NodeId node_id, const char *file_name) |
Loads a geometry file and put its contents onto a SOP node. More... | |
HAPI_DECL | HAPI_SaveNodeToFile (const HAPI_Session *session, HAPI_NodeId node_id, const char *file_name) |
Saves the node and all its contents to file. The saved file can be loaded by calling HAPI_LoadNodeFromFile. More... | |
HAPI_DECL | HAPI_LoadNodeFromFile (const HAPI_Session *session, const char *file_name, HAPI_NodeId parent_node_id, const char *node_label, HAPI_Bool cook_on_load, HAPI_NodeId *new_node_id) |
Loads and creates a previously saved node and all its contents from given file. The saved file must have been created by calling HAPI_SaveNodeToFile. More... | |
HAPI_DECL | HAPI_GetGeoSize (const HAPI_Session *session, HAPI_NodeId node_id, const char *format, int *size) |
Cache the current state of the geo to memory, given the format, and return the size. Use this size with your call to HAPI_SaveGeoToMemory() to copy the cached geo to your buffer. It is guaranteed that the size will not change between your call to HAPI_GetGeoSize() and HAPI_SaveGeoToMemory(). More... | |
HAPI_DECL | HAPI_SaveGeoToMemory (const HAPI_Session *session, HAPI_NodeId node_id, char *buffer, int length) |
Saves the cached geometry to your buffer in memory, whose format and required size is identified by the call to HAPI_GetGeoSize(). The call to HAPI_GetGeoSize() is required as HAPI_GetGeoSize() does the actual saving work. More... | |
HAPI_DECL | HAPI_LoadGeoFromMemory (const HAPI_Session *session, HAPI_NodeId node_id, const char *format, const char *buffer, int length) |
Loads a geometry from memory and put its contents onto a SOP node. More... | |
Functions for working with memory and file caches
HAPI_DECL HAPI_GetActiveCacheCount | ( | const HAPI_Session * | session, |
int * | active_cache_count | ||
) |
Get the number of currently active caches.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[out] | active_cache_count | The number of currently active caches. |
HAPI_DECL HAPI_GetActiveCacheNames | ( | const HAPI_Session * | session, |
HAPI_StringHandle * | cache_names_array, | ||
int | active_cache_count | ||
) |
Get the names of the currently active caches.
Requires a valid active cache count which you get from: HAPI_GetActiveCacheCount().
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[out] | cache_names_array | String array with the returned cache names. Must be at least the size of active_cache_count. |
[in] | active_cache_count | The count returned by HAPI_GetActiveCacheCount(). |
HAPI_DECL HAPI_GetCacheProperty | ( | const HAPI_Session * | session, |
const char * | cache_name, | ||
HAPI_CacheProperty | cache_property, | ||
int * | property_value | ||
) |
Lets you inspect specific properties of the different memory caches in the current Houdini context.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | cache_name | Cache name from HAPI_GetActiveCacheNames(). |
[in] | cache_property | The specific property of the cache to get the value for. |
[out] | property_value | Returned property value. |
HAPI_DECL HAPI_GetGeoSize | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
const char * | format, | ||
int * | size | ||
) |
Cache the current state of the geo to memory, given the format, and return the size. Use this size with your call to HAPI_SaveGeoToMemory() to copy the cached geo to your buffer. It is guaranteed that the size will not change between your call to HAPI_GetGeoSize() and HAPI_SaveGeoToMemory().
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[in] | format | The file format, ie. ".obj", ".bgeo.sc" etc. |
[out] | size | The size of the buffer required to hold the output. |
HAPI_DECL HAPI_LoadGeoFromFile | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
const char * | file_name | ||
) |
Loads a geometry file and put its contents onto a SOP node.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[in] | file_name | The name of the file to be loaded |
HAPI_DECL HAPI_LoadGeoFromMemory | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
const char * | format, | ||
const char * | buffer, | ||
int | length | ||
) |
Loads a geometry from memory and put its contents onto a SOP node.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[in] | format | The file format, ie. "obj", "bgeo" etc. |
[in] | buffer | The buffer we will read the geometry from. |
[in] | length | The size of the buffer passed in. |
HAPI_DECL HAPI_LoadNodeFromFile | ( | const HAPI_Session * | session, |
const char * | file_name, | ||
HAPI_NodeId | parent_node_id, | ||
const char * | node_label, | ||
HAPI_Bool | cook_on_load, | ||
HAPI_NodeId * | new_node_id | ||
) |
Loads and creates a previously saved node and all its contents from given file. The saved file must have been created by calling HAPI_SaveNodeToFile.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | file_name | The name of the file to be loaded |
[in] | parent_node_id | The parent node id of the Geometry object. |
[in] | node_label | The name of the new Geometry object. |
[in] | cook_on_load | Set to true if you wish the nodes to cook as soon as they are created. Otherwise, you will have to call HAPI_CookNode() explicitly for each after you call this function. |
[out] | new_node_id | The newly created node id. |
HAPI_DECL HAPI_SaveGeoToFile | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
const char * | file_name | ||
) |
Saves a geometry to file. The type of file to save is to be determined by the extension ie. .bgeo, .obj.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[in] | file_name | The name of the file to be saved. The extension of the file determines its type. |
HAPI_DECL HAPI_SaveGeoToMemory | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
char * | buffer, | ||
int | length | ||
) |
Saves the cached geometry to your buffer in memory, whose format and required size is identified by the call to HAPI_GetGeoSize(). The call to HAPI_GetGeoSize() is required as HAPI_GetGeoSize() does the actual saving work.
Also note that this call to HAPI_SaveGeoToMemory will delete the internal geo buffer that was cached in the previous call to HAPI_GetGeoSize(). This means that you will need to call HAPI_GetGeoSize() again before you can call this function.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[out] | buffer | The buffer we will write into. |
[in] | length | The size of the buffer passed in. |
HAPI_DECL HAPI_SaveNodeToFile | ( | const HAPI_Session * | session, |
HAPI_NodeId | node_id, | ||
const char * | file_name | ||
) |
Saves the node and all its contents to file. The saved file can be loaded by calling HAPI_LoadNodeFromFile.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | node_id | The node id. |
[in] | file_name | The name of the file to be saved. The extension of the file determines its type. |
HAPI_DECL HAPI_SetCacheProperty | ( | const HAPI_Session * | session, |
const char * | cache_name, | ||
HAPI_CacheProperty | cache_property, | ||
int | property_value | ||
) |
Lets you modify specific properties of the different memory caches in the current Houdini context. This includes clearing caches, reducing their memory use, or changing how memory limits are respected by a cache.
[in] | session | The session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session. |
[in] | cache_name | Cache name from HAPI_GetActiveCacheNames(). |
[in] | cache_property | The specific property of the cache to modify. |
[in] | property_value | The new property value. |