Houdini Engine 2.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HAPI.h File Reference
#include "HAPI_API.h"
#include "HAPI_Common.h"
#include "HAPI_Helpers.h"
+ Include dependency graph for HAPI.h:

Go to the source code of this file.

Functions

HAPI_DECL HAPI_CreateInProcessSession (HAPI_Session *session)
 Creates a new in-process session. There can only be one such session per host process. More...
 
HAPI_DECL HAPI_StartThriftSocketServer (HAPI_Bool auto_close, int port, float timeout_ms, HAPI_ProcessId *process_id)
 Starts a Thrift RPC server process on the local host serving clients on a TCP socket and waits for it to start serving. It is safe to create an RPC session on local host using the specified port after this call succeeds. More...
 
HAPI_DECL HAPI_CreateThriftSocketSession (HAPI_Session *session, const char *host_name, int port)
 Creates a Thrift RPC session using a TCP socket as transport. More...
 
HAPI_DECL HAPI_StartThriftNamedPipeServer (HAPI_Bool auto_close, const char *pipe_name, float timeout_ms, HAPI_ProcessId *process_id)
 Starts a Thrift RPC server process on the local host serving clients on a Windows named pipe or a Unix domain socket and waits for it to start serving. It is safe to create an RPC session using the specified pipe or socket after this call succeeds. More...
 
HAPI_DECL HAPI_CreateThriftNamedPipeSession (HAPI_Session *session, const char *pipe_name)
 Creates a Thrift RPC session using a Windows named pipe or a Unix domain socket as transport. More...
 
HAPI_DECL HAPI_BindCustomImplementation (HAPI_SessionType session_type, const char *dll_path)
 Binds a new implementation DLL to one of the custom session slots. More...
 
HAPI_DECL HAPI_CreateCustomSession (HAPI_SessionType session_type, void *session_info, HAPI_Session *session)
 Creates a new session using a custom implementation. Note that the implementation dll must already have been bound to the session via calling HAPI_BindCustomImplementation(). More...
 
HAPI_DECL HAPI_IsSessionValid (const HAPI_Session *session)
 Checks whether the session identified by HAPI_Session::id is a valid session opened in the implementation identified by HAPI_Session::type. More...
 
HAPI_DECL HAPI_CloseSession (const HAPI_Session *session)
 Closes a session. If the session has been established using RPC, then the RPC connection is closed. More...
 
HAPI_DECL HAPI_IsInitialized (const HAPI_Session *session)
 Check whether the runtime has been initialized yet using HAPI_Initialize(). Function will return HAPI_RESULT_SUCCESS if the runtime has been initialized and HAPI_RESULT_FAILURE otherwise. More...
 
HAPI_DECL HAPI_Initialize (const HAPI_Session *session, const HAPI_CookOptions *cook_options, HAPI_Bool use_cooking_thread, int cooking_thread_stack_size, const char *otl_search_path, const char *dso_search_path, const char *image_dso_search_path, const char *audio_dso_search_path)
 Create the asset manager, set up environment variables, and initialize the main Houdini scene. No license checking is during this step. Only when you try to load an asset library (OTL) do we actually check for licenses. More...
 
HAPI_DECL HAPI_SetEnvFiles (const HAPI_Session *session, const char *houdini_environment_files)
 [HAPI_Initialize] More...
 
HAPI_DECL HAPI_Cleanup (const HAPI_Session *session)
 Clean up memory. This will unload all assets and you will need to call HAPI_Initialize() again to be able to use any HAPI methods again. More...
 
HAPI_DECL HAPI_GetEnvInt (HAPI_EnvIntType int_type, int *value)
 Gives back a certain environment integers like version number. Note that you do not need a session for this. These constants are hard-coded in all HAPI implementations, including HARC and HAPIL. This should be the first API you call to determine if any future API calls will mismatch implementation. More...
 
HAPI_DECL HAPI_GetSessionEnvInt (const HAPI_Session *session, HAPI_SessionEnvIntType int_type, int *value)
 Gives back a certain session-specific environment integers like current license type being used. More...
 
HAPI_DECL HAPI_GetServerEnvInt (const HAPI_Session *session, const char *variable_name, int *value)
 Get environment variable from the server process as an integer. More...
 
HAPI_DECL HAPI_GetServerEnvString (const HAPI_Session *session, const char *variable_name, HAPI_StringHandle *value)
 Get environment variable from the server process as a string. More...
 
HAPI_DECL HAPI_SetServerEnvInt (const HAPI_Session *session, const char *variable_name, int value)
 Set environment variable for the server process as an integer. More...
 
HAPI_DECL HAPI_SetServerEnvString (const HAPI_Session *session, const char *variable_name, const char *value)
 Set environment variable for the server process as a string. More...
 
HAPI_DECL HAPI_GetStatus (const HAPI_Session *session, HAPI_StatusType status_type, int *status)
 Gives back the status code for a specific status type. More...
 
HAPI_DECL HAPI_GetStatusStringBufLength (const HAPI_Session *session, HAPI_StatusType status_type, HAPI_StatusVerbosity verbosity, int *buffer_length)
 Return length of string buffer storing status string message. More...
 
HAPI_DECL HAPI_GetStatusString (const HAPI_Session *session, HAPI_StatusType status_type, char *string_value, int length)
 Return status string message. More...
 
HAPI_DECL HAPI_GetCookingTotalCount (const HAPI_Session *session, int *count)
 Get total number of nodes that need to cook in the current session. More...
 
HAPI_DECL HAPI_GetCookingCurrentCount (const HAPI_Session *session, int *count)
 Get current number of nodes that have already cooked in the current session. Note that this is a very crude approximation of the cooking progress - it may never make it to 100% or it might spend another hour at 100%. Use HAPI_GetStatusString to get a better idea of progress if this number gets stuck. More...
 
HAPI_DECL HAPI_ConvertTransform (const HAPI_Session *session, const HAPI_TransformEuler *transform_in, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform_out)
 Converts the transform described by a HAPI_TransformEuler struct into a different transform and rotation order. More...
 
HAPI_DECL HAPI_ConvertMatrixToQuat (const HAPI_Session *session, const float *matrix, HAPI_RSTOrder rst_order, HAPI_Transform *transform_out)
 Converts a 4x4 matrix into its TRS form. More...
 
HAPI_DECL HAPI_ConvertMatrixToEuler (const HAPI_Session *session, const float *matrix, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform_out)
 Converts a 4x4 matrix into its TRS form. More...
 
HAPI_DECL HAPI_ConvertTransformQuatToMatrix (const HAPI_Session *session, const HAPI_Transform *transform, float *matrix)
 Converts HAPI_Transform into a 4x4 transform matrix. More...
 
HAPI_DECL HAPI_ConvertTransformEulerToMatrix (const HAPI_Session *session, const HAPI_TransformEuler *transform, float *matrix)
 Converts HAPI_TransformEuler into a 4x4 transform matrix. More...
 
HAPI_DECL HAPI_PythonThreadInterpreterLock (const HAPI_Session *session, HAPI_Bool locked)
 Acquires or releases the Python interpreter lock. This is needed if HAPI is called from Python and HAPI is in threaded mode (see HAPI_Initialize()). More...
 
HAPI_DECL HAPI_GetStringBufLength (const HAPI_Session *session, HAPI_StringHandle string_handle, int *buffer_length)
 Gives back the string length of the string with the given handle. More...
 
HAPI_DECL HAPI_GetString (const HAPI_Session *session, HAPI_StringHandle string_handle, char *string_value, int length)
 Gives back the string value of the string with the given handle. More...
 
HAPI_DECL HAPI_GetTime (const HAPI_Session *session, float *time)
 Gets the global time of the scene. All API calls deal with this time to cook. More...
 
HAPI_DECL HAPI_SetTime (const HAPI_Session *session, float time)
 Sets the global time of the scene. All API calls will deal with this time to cook. More...
 
HAPI_DECL HAPI_GetTimelineOptions (const HAPI_Session *session, HAPI_TimelineOptions *timeline_options)
 Gets the current global timeline options. More...
 
HAPI_DECL HAPI_SetTimelineOptions (const HAPI_Session *session, const HAPI_TimelineOptions *timeline_options)
 Sets the global timeline options. More...
 
HAPI_DECL HAPI_IsAssetValid (const HAPI_Session *session, HAPI_AssetId asset_id, int asset_validation_id, int *answer)
 Determine if your instance of the asset actually still exists inside the Houdini scene. This is what can be used to determine when the Houdini scene needs to be re-populated using the host application's instances of the assets. Note that this function will ALWAYS return HAPI_RESULT_SUCCESS. More...
 
HAPI_DECL HAPI_LoadAssetLibraryFromFile (const HAPI_Session *session, const char *file_path, HAPI_Bool allow_overwrite, HAPI_AssetLibraryId *library_id)
 Loads a Houdini asset library (OTL) from a .otl file. It does NOT instantiate anything inside the Houdini scene. More...
 
HAPI_DECL HAPI_LoadAssetLibraryFromMemory (const HAPI_Session *session, const char *library_buffer, int library_buffer_length, HAPI_Bool allow_overwrite, HAPI_AssetLibraryId *library_id)
 Loads a Houdini asset library (OTL) from memory. It does NOT instantiate anything inside the Houdini scene. More...
 
HAPI_DECL HAPI_GetAvailableAssetCount (const HAPI_Session *session, HAPI_AssetLibraryId library_id, int *asset_count)
 Get the number of assets contained in an asset library. You should call HAPI_LoadAssetLibraryFromFile() prior to get a library_id. More...
 
HAPI_DECL HAPI_GetAvailableAssets (const HAPI_Session *session, HAPI_AssetLibraryId library_id, HAPI_StringHandle *asset_names_array, int asset_count)
 Get the names of the assets contained in an asset library. More...
 
HAPI_DECL HAPI_InstantiateAsset (const HAPI_Session *session, const char *asset_name, HAPI_Bool cook_on_load, HAPI_AssetId *asset_id)
 Instantiate an asset by name. The asset has to have been loaded as part of an asset library, using HAPI_LoadAssetLibraryFromFile(). More...
 
HAPI_DECL HAPI_CreateCurve (const HAPI_Session *session, HAPI_AssetId *asset_id)
 Creates a special curve asset that can be used as input for other assets in the scene. More...
 
HAPI_DECL HAPI_CreateInputAsset (const HAPI_Session *session, HAPI_AssetId *asset_id, const char *name)
 Creates a special asset that can accept geometry input. This will create a dummy OBJ node with a Null SOP inside that you can set the geometry of using the geometry SET APIs. You can then connect this asset to any other asset using inter-asset connection APIs. More...
 
HAPI_DECL HAPI_DestroyAsset (const HAPI_Session *session, HAPI_AssetId asset_id)
 Destroy the asset instance. More...
 
HAPI_DECL HAPI_GetAssetInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_AssetInfo *asset_info)
 Fill an asset_info struct. More...
 
HAPI_DECL HAPI_CookAsset (const HAPI_Session *session, HAPI_AssetId asset_id, const HAPI_CookOptions *cook_options)
 Initiate a cook on this asset. Note that this may trigger cooks on other assets if they are connected. More...
 
HAPI_DECL HAPI_Interrupt (const HAPI_Session *session)
 Interrupt a cook or load operation. More...
 
HAPI_DECL HAPI_GetAssetTransform (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_RSTOrder rst_order, HAPI_XYZOrder rot_order, HAPI_TransformEuler *transform)
 Get the transform of an asset to match the transform of the asset on the client side. More...
 
HAPI_DECL HAPI_SetAssetTransform (const HAPI_Session *session, HAPI_AssetId asset_id, const HAPI_TransformEuler *transform)
 Set the transform of an asset to match the transform of the asset on the client side. More...
 
HAPI_DECL HAPI_GetInputName (const HAPI_Session *session, HAPI_AssetId asset_id, int input_idx, int input_type, HAPI_StringHandle *name)
 Get the name of an asset's input. This function will return a string handle for the name which will be valid (persist) until the next call to this function. More...
 
HAPI_DECL HAPI_LoadHIPFile (const HAPI_Session *session, const char *file_name, HAPI_Bool cook_on_load)
 Loads a .hip file into the main Houdini scene. More...
 
HAPI_DECL HAPI_CheckForNewAssets (const HAPI_Session *session, int *new_asset_count)
 Resyncs a HAPI to the underlying Houdini scene after one more more nodes have been created by an asset (say using python) at the /OBJ level, or a new scene has been loaded using HAPI_LoadHIPFile(). Note that function will always return the same thing until you call HAPI_GetNewAssetIds() to clear the results. More...
 
HAPI_DECL HAPI_GetNewAssetIds (const HAPI_Session *session, HAPI_AssetId *asset_ids_array, int new_asset_count)
 Retrieves the asset ids from the previous call to HAPI_CheckForNewAssets(). More...
 
HAPI_DECL HAPI_SaveHIPFile (const HAPI_Session *session, const char *file_path, HAPI_Bool lock_nodes)
 Saves a .hip file of the current Houdini scene. More...
 
HAPI_DECL HAPI_GetNodeInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_NodeInfo *node_info)
 Fill an HAPI_NodeInfo struct. More...
 
HAPI_DECL HAPI_GetEditableNodeNetworks (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_NodeId *node_networks_array, int count)
 Get the node ids of the editable node networks exposed by the asset author. More...
 
HAPI_DECL HAPI_GetNodeNetworkChildren (const HAPI_Session *session, HAPI_NodeId network_node_id, HAPI_NodeId *child_node_ids_array, int count)
 Get the node ids of the children nodes of the specified parent node network. More...
 
HAPI_DECL HAPI_CreateNode (const HAPI_Session *session, HAPI_NodeId parent_node_id, const char *operator_name, HAPI_NodeId *new_node_id)
 Create a node inside a node network. Nodes created this way will have their HAPI_NodeInfo::createdPostAssetLoad set to true. More...
 
HAPI_DECL HAPI_DeleteNode (const HAPI_Session *session, HAPI_NodeId node_id)
 Delete a node from a node network. Only nodes with their HAPI_NodeInfo::createdPostAssetLoad set to true can be deleted this way. More...
 
HAPI_DECL HAPI_RenameNode (const HAPI_Session *session, HAPI_NodeId node_id, const char *new_name)
 Rename a node that you created. Only nodes with their HAPI_NodeInfo::createdPostAssetLoad set to true can be deleted this way. More...
 
HAPI_DECL HAPI_ConnectNodeInput (const HAPI_Session *session, HAPI_NodeId node_id, int input_index, HAPI_NodeId node_id_to_connect)
 Connect two nodes together. More...
 
HAPI_DECL HAPI_DisconnectNodeInput (const HAPI_Session *session, HAPI_NodeId node_id, int input_index)
 Disconnect a node input. More...
 
HAPI_DECL HAPI_QueryNodeInput (const HAPI_Session *session, HAPI_NodeId node_to_query, int input_index, HAPI_NodeId *connected_node_id)
 Query which node is connected to another node's input. More...
 
HAPI_DECL HAPI_GetParameters (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmInfo *parm_infos_array, int start, int length)
 Fill an array of HAPI_ParmInfo structs with parameter information from the asset instance node. More...
 
HAPI_DECL HAPI_GetParmInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, HAPI_ParmInfo *parm_info)
 Get the parm info of a parameter by parm id. More...
 
HAPI_DECL HAPI_GetParmIdFromName (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, HAPI_ParmId *parm_id)
 All parameter APIs require a HAPI_ParmId but if you know the parameter you wish to operate on by name than you can use this function to get its HAPI_ParmId. If the parameter with the given name is not found the parameter id returned will be -1. More...
 
HAPI_DECL HAPI_GetParmInfoFromName (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, HAPI_ParmInfo *parm_info)
 Get the parm info of a parameter by name. More...
 
HAPI_DECL HAPI_GetParmIntValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, int *value)
 Get single parm int value by name. More...
 
HAPI_DECL HAPI_GetParmIntValues (const HAPI_Session *session, HAPI_NodeId node_id, int *values_array, int start, int length)
 Fill an array of parameter int values. This is more efficient than calling HAPI_GetParmIntValue() individually for each parameter value. More...
 
HAPI_DECL HAPI_GetParmFloatValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, float *value)
 Get single parm float value by name. More...
 
HAPI_DECL HAPI_GetParmFloatValues (const HAPI_Session *session, HAPI_NodeId node_id, float *values_array, int start, int length)
 Fill an array of parameter float values. This is more efficient than calling HAPI_GetParmFloatValue() individually for each parameter value. More...
 
HAPI_DECL HAPI_GetParmStringValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, HAPI_Bool evaluate, HAPI_StringHandle *value)
 Get single parm string value by name. More...
 
HAPI_DECL HAPI_GetParmStringValues (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_Bool evaluate, HAPI_StringHandle *values_array, int start, int length)
 Fill an array of parameter string handles. These handles must be used in conjunction with HAPI_GetString() to get the actual string values. This is more efficient than calling HAPI_GetParmStringValue() individually for each parameter value. More...
 
HAPI_DECL HAPI_GetParmChoiceLists (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmChoiceInfo *parm_choices_array, int start, int length)
 Fill an array of HAPI_ParmChoiceInfo structs with parameter choice list information from the asset instance node. More...
 
HAPI_DECL HAPI_SetParmIntValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, int value)
 Set single parm int value by name. More...
 
HAPI_DECL HAPI_SetParmIntValues (const HAPI_Session *session, HAPI_NodeId node_id, const int *values_array, int start, int length)
 Set (push) an array of parameter int values. More...
 
HAPI_DECL HAPI_SetParmFloatValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, float value)
 Set single parm float value by name. More...
 
HAPI_DECL HAPI_SetParmFloatValues (const HAPI_Session *session, HAPI_NodeId node_id, const float *values_array, int start, int length)
 Set (push) an array of parameter float values. More...
 
HAPI_DECL HAPI_SetParmStringValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *value, HAPI_ParmId parm_id, int index)
 Set (push) a string value. We can only set a single value at a time because we want to avoid fixed size string buffers. More...
 
HAPI_DECL HAPI_InsertMultiparmInstance (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int instance_position)
 Insert an instance of a multiparm before instance_position. More...
 
HAPI_DECL HAPI_RemoveMultiparmInstance (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int instance_position)
 Remove the instance of a multiparm given by instance_position. More...
 
HAPI_DECL HAPI_GetHandleInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_HandleInfo *handle_infos_array, int start, int length)
 Fill an array of HAPI_HandleInfo structs with information about every exposed user manipulation handle on the asset. More...
 
HAPI_DECL HAPI_GetHandleBindingInfo (const HAPI_Session *session, HAPI_AssetId asset_id, int handle_index, HAPI_HandleBindingInfo *handle_binding_infos_array, int start, int length)
 Fill an array of HAPI_HandleInfo structs with information about every exposed user manipulation handle on the asset. More...
 
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_GetObjects (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectInfo *object_infos_array, int start, int length)
 Fill an array of HAPI_ObjectInfo structs with information on each visible object in the scene that has a SOP network (is not a sub-network). Note that this function will reset all the objects' HAPI_ObjectInfo.haveGeosChanged flags to false after it returns the original flag values. More...
 
HAPI_DECL HAPI_GetObjectTransforms (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
 Fill an array of HAPI_Transform structs with the transforms of each visible object in the scene that has a SOP network (is not a sub-network). Note that this function will reset all the objects' HAPI_ObjectInfo::hasTransformChanged flags to false after it returns the original flag values. More...
 
HAPI_DECL HAPI_GetInstanceTransforms (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
 Fill an array of HAPI_Transform structs with the transforms of each instance of this instancer object. More...
 
HAPI_DECL HAPI_SetObjectTransform (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, const HAPI_TransformEuler *transform)
 Set the transform of an individual object. This is mostly used with marshaled geometry objects. Trying to modify the transform of an object belonging to an asset other than the special External Input Asset with object id 0 will most likely fail, unless the transforms are exposed as editable via exposed parameters. More...
 
HAPI_DECL HAPI_GetGeoInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GeoInfo *geo_info)
 Get the main geometry info struct (HAPI_GeoInfo). Note that this function will reset all the geo_infos' HAPI_GeoInfo::hasGeoChanged flags to false after it returns the original flag values. More...
 
HAPI_DECL HAPI_GetPartInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_PartInfo *part_info)
 Get a particular part info struct. More...
 
HAPI_DECL HAPI_GetFaceCounts (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *face_counts_array, int start, int length)
 Get the array of faces where the nth integer in the array is the number of vertices the nth face has. More...
 
HAPI_DECL HAPI_GetVertexList (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *vertex_list_array, int start, int length)
 Get array containing the vertex-point associations where the ith element in the array is the point index the ith vertex associates with. More...
 
HAPI_DECL HAPI_GetAttributeInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeOwner owner, HAPI_AttributeInfo *attr_info)
 Get the main geometry info struct (HAPI_GeoInfo). More...
 
HAPI_DECL HAPI_GetAttributeNames (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_AttributeOwner owner, HAPI_StringHandle *attribute_names_array, int count)
 Get list of attribute names by attribute owner. Note that the name string handles are only valid until the next time this function is called. More...
 
HAPI_DECL HAPI_GetAttributeIntData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int *data_array, int start, int length)
 Get attribute integer data. More...
 
HAPI_DECL HAPI_GetAttributeInt64Data (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int stride, HAPI_Int64 *data_array, int start, int length)
 Get attribute 64-bit integer data. More...
 
HAPI_DECL HAPI_GetAttributeFloatData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, float *data_array, int start, int length)
 Get attribute float data. More...
 
HAPI_DECL HAPI_GetAttributeFloat64Data (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int stride, double *data_array, int start, int length)
 Get 64-bit attribute float data. More...
 
HAPI_DECL HAPI_GetAttributeStringData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int *data_array, int start, int length)
 Get attribute string data. Note that the string handles returned are only valid until the next time this function is called. More...
 
HAPI_DECL HAPI_GetGroupNames (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GroupType group_type, HAPI_StringHandle *group_names_array, int group_count)
 Get group names for an entire geo. Please note that this function is NOT per-part, but it is per-geo. The companion function HAPI_GetGroupMembership() IS per-part. Also keep in mind that the name string handles are only valid until the next time this function is called. More...
 
HAPI_DECL HAPI_GetGroupMembership (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_GroupType group_type, const char *group_name, int *membership_array, int start, int length)
 Get group membership. More...
 
HAPI_DECL HAPI_GetInstancedPartIds (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_PartId *instanced_parts_array, int start, int length)
 Get the part ids that this instancer part is instancing. More...
 
HAPI_DECL HAPI_GetInstancerPartTransforms (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_RSTOrder rst_order, HAPI_Transform *transforms_array, int start, int length)
 Get the instancer part's list of transforms on which to instance the instanced parts you got from HAPI_GetInstancedPartIds(). More...
 
HAPI_DECL HAPI_SetGeoInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GeoInfo *geo_info)
 Set the main geometry info struct (HAPI_GeoInfo). TODO: This function does nothing at the moment. (Placeholder) More...
 
HAPI_DECL HAPI_SetPartInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_PartInfo *part_info)
 Set the main part info struct (HAPI_PartInfo). More...
 
HAPI_DECL HAPI_SetFaceCounts (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const int *face_counts_array, int start, int length)
 Set the array of faces where the nth integer in the array is the number of vertices the nth face has. More...
 
HAPI_DECL HAPI_SetVertexList (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const int *vertex_list_array, int start, int length)
 Set array containing the vertex-point associations where the ith element in the array is the point index the ith vertex associates with. More...
 
HAPI_DECL HAPI_AddAttribute (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info)
 Add an attribute. More...
 
HAPI_DECL HAPI_SetAttributeIntData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const int *data_array, int start, int length)
 Set attribute integer data. More...
 
HAPI_DECL HAPI_SetAttributeInt64Data (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const HAPI_Int64 *data_array, int start, int length)
 Set 64-bit attribute integer data. More...
 
HAPI_DECL HAPI_SetAttributeFloatData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const float *data_array, int start, int length)
 Set attribute float data. More...
 
HAPI_DECL HAPI_SetAttributeFloat64Data (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const double *data_array, int start, int length)
 Set 64-bit attribute float data. More...
 
HAPI_DECL HAPI_SetAttributeStringData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *name, const HAPI_AttributeInfo *attr_info, const char **data_array, int start, int length)
 Set attribute string data. More...
 
HAPI_DECL HAPI_AddGroup (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GroupType group_type, const char *group_name)
 Add a group to the input geo with the given type and name. More...
 
HAPI_DECL HAPI_SetGroupMembership (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_GroupType group_type, const char *group_name, const int *membership_array, int start, int length)
 Set group membership. More...
 
HAPI_DECL HAPI_CommitGeo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id)
 Commit the current input geometry to the cook engine. Nodes that use this geometry node will re-cook using the input geometry given through the geometry setter API calls. More...
 
HAPI_DECL HAPI_RevertGeo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id)
 Remove all changes that have been committed to this geometry. Only applies to geometry nodes that are exposed edit nodes. More...
 
HAPI_DECL HAPI_ConnectAssetTransform (const HAPI_Session *session, HAPI_AssetId asset_id_from, HAPI_AssetId asset_id_to, int input_idx)
 Connect the transform of two assets together. More...
 
HAPI_DECL HAPI_DisconnectAssetTransform (const HAPI_Session *session, HAPI_AssetId asset_id, int input_idx)
 Break an existing transform connection. More...
 
HAPI_DECL HAPI_ConnectAssetGeometry (const HAPI_Session *session, HAPI_AssetId asset_id_from, HAPI_ObjectId object_id_from, HAPI_AssetId asset_id_to, int input_idx)
 Connect the geometry of two assets together. For example we can connect a particular piece of geometry from an object level asset to a sop level asset or even another object level asset. This method gives you the fine grained control over the exact piece of geometry to connect by allowing you to specify the exact object and group of the geometry you are trying to connect. More...
 
HAPI_DECL HAPI_DisconnectAssetGeometry (const HAPI_Session *session, HAPI_AssetId asset_id, int input_idx)
 Break an existing geometry connection. More...
 
HAPI_DECL HAPI_GetMaterialIdsOnFaces (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_Bool *are_all_the_same, HAPI_MaterialId *material_ids_array, int start, int length)
 Get material ids by face/primitive. The material ids returned will be valid as long as the asset is alive. You should query this list after every cook to see if the material assignments have changed. You should also query each material individually using HAPI_GetMaterialInfo() to see if it is dirty and needs to be re-imported. More...
 
HAPI_DECL HAPI_GetMaterialInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_MaterialInfo *material_info)
 Get the material info. More...
 
 HAPI_GetMaterialOnPart (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_MaterialInfo *material_info)
 Get the material on a part. More...
 
 HAPI_GetMaterialOnGroup (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *group_name, HAPI_MaterialInfo *material_info)
 Get the material on a group. Use the HAPI_GetGroupMembership() call to determine where the material should be applied. More...
 
HAPI_DECL HAPI_RenderTextureToImage (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_ParmId parm_id)
 Render only a single texture to an image for later extraction. An example use of this method might be to render the diffuse, normal, and bump texture maps of a material to individual texture files for use within the client application. More...
 
HAPI_DECL HAPI_GetSupportedImageFileFormatCount (const HAPI_Session *session, int *file_format_count)
 Get the number of supported texture file formats. More...
 
HAPI_DECL HAPI_GetSupportedImageFileFormats (const HAPI_Session *session, HAPI_ImageFileFormat *formats_array, int file_format_count)
 Get a list of support image file formats - their names, descriptions and a list of recognized extensions. More...
 
HAPI_DECL HAPI_GetImageInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_ImageInfo *image_info)
 Get information about the image that was just rendered, like resolution and default file format. This information will be used when extracting planes to an image. More...
 
HAPI_DECL HAPI_SetImageInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, const HAPI_ImageInfo *image_info)
 Set image information like resolution and file format. This information will be used when extracting planes to an image. More...
 
HAPI_DECL HAPI_GetImagePlaneCount (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, int *image_plane_count)
 Get the number of image planes for the just rendered image. More...
 
HAPI_DECL HAPI_GetImagePlanes (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, HAPI_StringHandle *image_planes_array, int image_plane_count)
 Get the names of the image planes of the just rendered image. More...
 
HAPI_DECL HAPI_ExtractImageToFile (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, const char *image_file_format_name, const char *image_planes, const char *destination_folder_path, const char *destination_file_name, int *destination_file_path)
 Extract a rendered image to a file. More...
 
HAPI_DECL HAPI_ExtractImageToMemory (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, const char *image_file_format_name, const char *image_planes, int *buffer_size)
 Extract a rendered image to memory. More...
 
HAPI_DECL HAPI_GetImageMemoryBuffer (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_MaterialId material_id, char *buffer, int length)
 Fill your allocated buffer with the just extracted image buffer. More...
 
HAPI_DECL HAPI_SetAnimCurve (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int parm_index, const HAPI_Keyframe *curve_keyframes_array, int keyframe_count)
 Set an animation curve on a parameter of an exposed node. More...
 
HAPI_DECL HAPI_SetTransformAnimCurve (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_TransformComponent trans_comp, const HAPI_Keyframe *curve_keyframes_array, int keyframe_count)
 A specialized convenience function to set the T,R,S values on an exposed node. More...
 
HAPI_DECL HAPI_ResetSimulation (const HAPI_Session *session, HAPI_AssetId asset_id)
 Resets the simulation cache of the asset. This is very useful for assets that use dynamics, to be called after some setup has changed for the asset - for example, asset inputs. More...
 
HAPI_DECL HAPI_GetVolumeInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_VolumeInfo *volume_info)
 Retrieve any meta-data about the volume primitive, including its transform, location, scale, taper, resolution. More...
 
HAPI_DECL HAPI_GetFirstVolumeTile (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_VolumeTileInfo *tile)
 Iterate through a volume based on 8x8x8 sections of the volume Start iterating through the value of the volume at part_id. More...
 
HAPI_DECL HAPI_GetNextVolumeTile (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_VolumeTileInfo *tile)
 Iterate through a volume based on 8x8x8 sections of the volume Continue iterating through the value of the volume at part_id. More...
 
HAPI_DECL HAPI_GetVolumeVoxelFloatData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, float *values_array, int value_count)
 Retrieve floating point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call. More...
 
HAPI_DECL HAPI_GetVolumeTileFloatData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, float fill_value, const HAPI_VolumeTileInfo *tile, float *values_array, int length)
 Retrieve floating point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value. More...
 
HAPI_DECL HAPI_GetVolumeVoxelIntData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, int *values_array, int value_count)
 Retrieve integer point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call. More...
 
HAPI_DECL HAPI_GetVolumeTileIntData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int fill_value, const HAPI_VolumeTileInfo *tile, int *values_array, int length)
 Retrieve integer point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value. More...
 
HAPI_DECL HAPI_SetVolumeInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_VolumeInfo *volume_info)
 Set the volume info of a geo on a geo input. More...
 
HAPI_DECL HAPI_SetVolumeTileFloatData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_VolumeTileInfo *tile, const float *values_array, int length)
 Set the values of a float tile: this is an 8x8x8 subsection of the volume. More...
 
HAPI_DECL HAPI_SetVolumeTileIntData (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const HAPI_VolumeTileInfo *tile, const int *values_array, int length)
 Set the values of an int tile: this is an 8x8x8 subsection of the volume. More...
 
HAPI_DECL HAPI_GetCurveInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, HAPI_CurveInfo *info)
 Retrieve any meta-data about the curves, including the curve's type, order, and periodicity. More...
 
HAPI_DECL HAPI_GetCurveCounts (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *counts_array, int start, int length)
 Retrieve the number of vertices for each curve in the part. More...
 
HAPI_DECL HAPI_GetCurveOrders (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, int *orders_array, int start, int length)
 Retrieve the orders for each curve in the part if the curve has varying order. More...
 
HAPI_DECL HAPI_GetCurveKnots (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, float *knots_array, int start, int length)
 Retrieve the knots of the curves in this part. More...
 
HAPI_DECL HAPI_SetCurveInfo (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const HAPI_CurveInfo *info)
 Set meta-data for the curve mesh, including the curve type, order, and periodicity. More...
 
HAPI_DECL HAPI_SetCurveCounts (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const int *counts_array, int start, int length)
 Set the number of vertices for each curve in the part. More...
 
HAPI_DECL HAPI_SetCurveOrders (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const int *orders_array, int start, int length)
 Set the orders for each curve in the part if the curve has varying order. More...
 
HAPI_DECL HAPI_SetCurveKnots (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, HAPI_PartId part_id, const float *knots_array, int start, int length)
 Set the knots of the curves in this part. More...
 
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_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_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_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *file_name)
 Loads a geometry file and put its contents onto a SOP node. More...
 
HAPI_DECL HAPI_GetGeoSize (const HAPI_Session *session, HAPI_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_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_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_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_AssetId asset_id, HAPI_ObjectId object_id, HAPI_GeoId geo_id, const char *format, const char *buffer, int length)
 Loads a geometry from memory and put its contents onto a SOP node. More...
 

Function Documentation

HAPI_DECL HAPI_AddAttribute ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  name,
const HAPI_AttributeInfo attr_info 
)

Add an attribute.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo stores attribute properties.
HAPI_DECL HAPI_AddGroup ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_GroupType  group_type,
const char *  group_name 
)

Add a group to the input geo with the given type and name.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]group_typeThe group type.
[in]group_nameName of new group to be added.
HAPI_DECL HAPI_BindCustomImplementation ( HAPI_SessionType  session_type,
const char *  dll_path 
)

Binds a new implementation DLL to one of the custom session slots.

Parameters
[in]session_typeWhich custom implementation slot to bind the DLL to. Must be one of HAPI_SESSION_CUSTOM1, HAPI_SESSION_CUSTOM2, or HAPI_SESSION_CUSTOM3.
[in]dll_pathThe path to the custom implementation DLL.
HAPI_DECL HAPI_CheckForNewAssets ( const HAPI_Session session,
int *  new_asset_count 
)

Resyncs a HAPI to the underlying Houdini scene after one more more nodes have been created by an asset (say using python) at the /OBJ level, or a new scene has been loaded using HAPI_LoadHIPFile(). Note that function will always return the same thing until you call HAPI_GetNewAssetIds() to clear the results.

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.
[out]new_asset_countA pointer to an int that will receive the asset count.
HAPI_DECL HAPI_Cleanup ( const HAPI_Session session)

Clean up memory. This will unload all assets and you will need to call HAPI_Initialize() again to be able to use any HAPI methods again.

Note
This does NOT release any licenses.
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.
HAPI_DECL HAPI_CloseSession ( const HAPI_Session session)

Closes a session. If the session has been established using RPC, then the RPC connection is closed.

Parameters
[in]sessionThe HAPI_Session to close. After this call, this session is invalid and passing it to HAPI calls other than HAPI_IsSessionValid() may result in undefined behavior.
HAPI_DECL HAPI_CommitGeo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id 
)

Commit the current input geometry to the cook engine. Nodes that use this geometry node will re-cook using the input geometry given through the geometry setter API calls.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
HAPI_DECL HAPI_ConnectAssetGeometry ( const HAPI_Session session,
HAPI_AssetId  asset_id_from,
HAPI_ObjectId  object_id_from,
HAPI_AssetId  asset_id_to,
int  input_idx 
)

Connect the geometry of two assets together. For example we can connect a particular piece of geometry from an object level asset to a sop level asset or even another object level asset. This method gives you the fine grained control over the exact piece of geometry to connect by allowing you to specify the exact object and group of the geometry you are trying to connect.

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]asset_id_fromThe asset id of the source asset.
[in]object_id_fromThe object within the asset that contains the geometry to send.
[in]asset_id_toThe asset id of the destination asset.
[in]input_idxThe index on the destination asset where the connection should be made.
HAPI_DECL HAPI_ConnectAssetTransform ( const HAPI_Session session,
HAPI_AssetId  asset_id_from,
HAPI_AssetId  asset_id_to,
int  input_idx 
)

Connect the transform of two assets together.

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]asset_id_fromThe asset id of the source asset.
[in]asset_id_toThe asset id of the destination asset.
[in]input_idxThe index on the destination asset where the connection should be made.
HAPI_DECL HAPI_ConnectNodeInput ( const HAPI_Session session,
HAPI_NodeId  node_id,
int  input_index,
HAPI_NodeId  node_id_to_connect 
)

Connect two nodes together.

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 node whom's input to connect to.
[in]input_indexThe input index. Should be between 0 and the to_node's HAPI_NodeInfo::inputCount.
[in]node_id_to_connectThe node to connect to node_id's input.
HAPI_DECL HAPI_ConvertMatrixToEuler ( const HAPI_Session session,
const float *  matrix,
HAPI_RSTOrder  rst_order,
HAPI_XYZOrder  rot_order,
HAPI_TransformEuler transform_out 
)

Converts a 4x4 matrix into its TRS form.

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]matrixA 4x4 matrix expressed in a 16 element float array.
[in]rst_orderThe desired transform order of the output.
[in]rot_orderThe desired rotation order of the output.
[out]transform_outUsed for the output.
HAPI_DECL HAPI_ConvertMatrixToQuat ( const HAPI_Session session,
const float *  matrix,
HAPI_RSTOrder  rst_order,
HAPI_Transform transform_out 
)

Converts a 4x4 matrix into its TRS form.

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]matrixA 4x4 matrix expressed in a 16 element float array.
[in]rst_orderThe desired transform order of the output.
[out]transform_outUsed for the output.
HAPI_DECL HAPI_ConvertTransform ( const HAPI_Session session,
const HAPI_TransformEuler transform_in,
HAPI_RSTOrder  rst_order,
HAPI_XYZOrder  rot_order,
HAPI_TransformEuler transform_out 
)

Converts the transform described by a HAPI_TransformEuler struct into a different transform and rotation order.

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]transform_inThe transform to be converted.
[in]rst_orderThe desired transform order of the output.
[in]rot_orderThe desired rotation order of the output.
[out]transform_outThe converted transform.
HAPI_DECL HAPI_ConvertTransformEulerToMatrix ( const HAPI_Session session,
const HAPI_TransformEuler transform,
float *  matrix 
)

Converts HAPI_TransformEuler into a 4x4 transform matrix.

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]transformThe HAPI_TransformEuler you wish to convert.
[out]matrixA 16 element float array that will contain the result.
HAPI_DECL HAPI_ConvertTransformQuatToMatrix ( const HAPI_Session session,
const HAPI_Transform transform,
float *  matrix 
)

Converts HAPI_Transform into a 4x4 transform matrix.

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]transformThe HAPI_Transform you wish to convert.
[out]matrixA 16 element float array that will contain the result.
HAPI_DECL HAPI_CookAsset ( const HAPI_Session session,
HAPI_AssetId  asset_id,
const HAPI_CookOptions cook_options 
)

Initiate a cook on this asset. Note that this may trigger cooks on other assets if they are connected.

Note
In threaded mode, this is an async call!

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the cook operation has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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]asset_idThe asset id.
[in]cook_optionsThe cook options. Pass in NULL to use the global cook options that you specified when calling HAPI_Initialize().
HAPI_DECL HAPI_CreateCurve ( const HAPI_Session session,
HAPI_AssetId asset_id 
)

Creates a special curve asset that can be used as input for other assets in the scene.

Note
In threaded mode, this is an async call!

Note that when saving the Houdini scene using HAPI_SaveHIPFile() the curve nodes created with this method will be yellow and will start with the name "curve".

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.
[out]asset_idNewly created curve's asset id. Use HAPI_GetAssetInfo() to get more information about the asset.
HAPI_DECL HAPI_CreateCustomSession ( HAPI_SessionType  session_type,
void *  session_info,
HAPI_Session session 
)

Creates a new session using a custom implementation. Note that the implementation dll must already have been bound to the session via calling HAPI_BindCustomImplementation().

Parameters
[in]session_typesession_type indicates which custom session slot to create the session on.
[in,out]session_infoAny data required by the custom implementation to create its session.
[out]sessionA HAPI_Session struct to receive the session id, The sessionType parameter of the struct should also match the session_type parameter passed in.
HAPI_DECL HAPI_CreateInProcessSession ( HAPI_Session session)

Creates a new in-process session. There can only be one such session per host process.

Parameters
[out]sessionA HAPI_Session struct to receive the session id, in this case always 0.
HAPI_DECL HAPI_CreateInputAsset ( const HAPI_Session session,
HAPI_AssetId asset_id,
const char *  name 
)

Creates a special asset that can accept geometry input. This will create a dummy OBJ node with a Null SOP inside that you can set the geometry of using the geometry SET APIs. You can then connect this asset to any other asset using inter-asset connection APIs.

Note
In threaded mode, this is an async call!

All you need to remember is that this asset has a single object and a single geo which means that for all subsequent geometry setter functions just pass in 0 (zero) for the object id and 0 (zero) for the geo id.

Note that when saving the Houdini scene using HAPI_SaveHIPFile() the curve nodes created with this method will be green and will start with the name "input".

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.
[out]asset_idNewly created asset's id. Use HAPI_GetAssetInfo() to get more information about the asset.
[in]nameGive this input asset a name for easy debugging. The asset's obj node and the null SOP node will both get this given name with "input_" prepended. You can also pass NULL in which case the name will be "input#" where # is some number.
HAPI_DECL HAPI_CreateNode ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
const char *  operator_name,
HAPI_NodeId new_node_id 
)

Create a node inside a node network. Nodes created this way will have their HAPI_NodeInfo::createdPostAssetLoad set to true.

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]parent_node_idThe parent node network's node id.
[in]operator_nameThe name of the node operator type. This should include only the namespace, name, and version, For example, if you have an Object type asset, in the "hapi" namespace, of version 2.0, named "foo", the operator_name here will be: "hapi::foo::2.0". Normally, if you don't have a namespace or version, just pass "foo".
[out]new_node_idThe returned node id of the just-created node.
HAPI_DECL HAPI_CreateThriftNamedPipeSession ( HAPI_Session session,
const char *  pipe_name 
)

Creates a Thrift RPC session using a Windows named pipe or a Unix domain socket as transport.

Parameters
[out]sessionA HAPI_Session struct to receive the session id, in this case always 0.
[in]pipe_nameThe name of the pipe or socket.
HAPI_DECL HAPI_CreateThriftSocketSession ( HAPI_Session session,
const char *  host_name,
int  port 
)

Creates a Thrift RPC session using a TCP socket as transport.

Parameters
[out]sessionA HAPI_Session struct to receive the session id, in this case always 0.
[in]host_nameThe name of the server host.
[in]portThe server port to connect to.
HAPI_DECL HAPI_DeleteNode ( const HAPI_Session session,
HAPI_NodeId  node_id 
)

Delete a node from a node network. Only nodes with their HAPI_NodeInfo::createdPostAssetLoad set to true can be deleted this way.

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 node to delete.
HAPI_DECL HAPI_DestroyAsset ( const HAPI_Session session,
HAPI_AssetId  asset_id 
)

Destroy the asset instance.

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]asset_idThe asset id.
HAPI_DECL HAPI_DisconnectAssetGeometry ( const HAPI_Session session,
HAPI_AssetId  asset_id,
int  input_idx 
)

Break an existing geometry connection.

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]asset_idThe asset id of the asset.
[in]input_idxThe index on the asset where the connection should be broken.
HAPI_DECL HAPI_DisconnectAssetTransform ( const HAPI_Session session,
HAPI_AssetId  asset_id,
int  input_idx 
)

Break an existing transform connection.

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]asset_idThe asset id of the asset.
[in]input_idxThe index on the asset where the connection should be broken.
HAPI_DECL HAPI_DisconnectNodeInput ( const HAPI_Session session,
HAPI_NodeId  node_id,
int  input_index 
)

Disconnect a node input.

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 node whom's input to disconnect.
[in]input_indexThe input index. Should be between 0 and the to_node's HAPI_NodeInfo::inputCount.
HAPI_DECL HAPI_ExtractImageToFile ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
const char *  image_file_format_name,
const char *  image_planes,
const char *  destination_folder_path,
const char *  destination_file_name,
int *  destination_file_path 
)

Extract a rendered image to a file.

Note that you must call HAPI_RenderTextureToImage() first for this method call to make sense.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[in]image_file_format_nameThe image file format name you wish the image to be extracted as. You can leave this parameter NULL to get the image in the original format if it comes from another texture file or in the default HAPI format, which is HAPI_DEFAULT_IMAGE_FORMAT_NAME, if the image is generated.

You can get some of the very common standard image file format names from HAPI_Common.h under the "Defines" section.

You can also get a list of all supported file formats (and the exact names this parameter expects) by using HAPI_GetSupportedImageFileFormats(). This list will include custom file formats you created via custom DSOs (see HDK docs about IMG_Format). You will get back a list of HAPI_ImageFileFormat. This parameter expects the HAPI_ImageFileFormat::nameSH of a given image file format.

Parameters
[in]image_planesThe image planes you wish to extract into the file. Multiple image planes should be separated by spaces.
[in]destination_folder_pathThe folder where the image file should be created.
[in]destination_file_nameOptional parameter to overwrite the name of the extracted texture file. This should NOT include the extension as the file type will be decided by the HAPI_ImageInfo you can set using HAPI_SetImageInfo(). You still have to use destination_file_path to get the final file path.

Pass in NULL to have the file name be automatically generated from the name of the material SHOP node, the name of the texture map parameter if the image was rendered from a texture, and the image plane names specified.

Parameters
[out]destination_file_pathThe full path string handle, including the destination_folder_path and the texture file name, to the extracted file. Note that this string handle will only be valid until the next call to this function.
HAPI_DECL HAPI_ExtractImageToMemory ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
const char *  image_file_format_name,
const char *  image_planes,
int *  buffer_size 
)

Extract a rendered image to memory.

Note that you must call HAPI_RenderTextureToImage() first for this method call to make sense.

Also note that this function will do all the work of extracting and composoting the image into a memory buffer but will not return to you that buffer, only its size. Use the returned size to allocated a sufficiently large buffer and call HAPI_GetImageMemoryBuffer() to fill your buffer with the just extracted image.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[in]image_file_format_nameThe image file format name you wish the image to be extracted as. You can leave this parameter NULL to get the image in the original format if it comes from another texture file or in the default HAPI format, which is HAPI_DEFAULT_IMAGE_FORMAT_NAME, if the image is generated.

You can get some of the very common standard image file format names from HAPI_Common.h under the "Defines" section.

You can also get a list of all supported file formats (and the exact names this parameter expects) by using HAPI_GetSupportedImageFileFormats(). This list will include custom file formats you created via custom DSOs (see HDK docs about IMG_Format). You will get back a list of HAPI_ImageFileFormat. This parameter expects the HAPI_ImageFileFormat::nameSH of a given image file format.

Parameters
[in]image_planesThe image planes you wish to extract into the file. Multiple image planes should be separated by spaces.
[out]buffer_sizeThe extraction will be done to an internal buffer who's size you get via this parameter. Use the returned buffer_size when calling HAPI_GetImageMemoryBuffer() to get the image buffer you just extracted.
HAPI_DECL HAPI_GetActiveCacheCount ( const HAPI_Session session,
int *  active_cache_count 
)

Get the number of currently active caches.

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.
[out]active_cache_countThe 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().

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.
[out]cache_names_arrayString array with the returned cache names. Must be at least the size of active_cache_count.
[in]active_cache_countThe count returned by HAPI_GetActiveCacheCount().
HAPI_DECL HAPI_GetAssetInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_AssetInfo asset_info 
)

Fill an asset_info struct.

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]asset_idThe asset id.
[out]asset_infoReturn value - contains things like asset id.
HAPI_DECL HAPI_GetAssetTransform ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_RSTOrder  rst_order,
HAPI_XYZOrder  rot_order,
HAPI_TransformEuler transform 
)

Get the transform of an asset to match the transform of the asset on the client side.

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]asset_idThe asset id.
[in]rst_orderThe order of application of translation, rotation and scale.
[in]rot_orderThe desired rotation order of the output.
[out]transformThe actual transform struct.
HAPI_DECL HAPI_GetAttributeFloat64Data ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
int  stride,
double *  data_array,
int  start,
int  length 
)

Get 64-bit attribute float data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]strideSpecifies how many items to skip over for each element. With a stride of -1, the stride will be set to attr_info->tuple_size. Otherwise, the stride will be set to the maximum of attr_info->tuple_size and stride.
[out]data_arrayAn 64-bit float array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start. Note, if 0 is passed for length, the function will just do nothing and return HAPI_RESULT_SUCCESS.
HAPI_DECL HAPI_GetAttributeFloatData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
float *  data_array,
int  start,
int  length 
)

Get attribute float data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[out]data_arrayAn float array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_GetAttributeInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeOwner  owner,
HAPI_AttributeInfo attr_info 
)

Get the main geometry info struct (HAPI_GeoInfo).

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]nameAttribute name.
[in]ownerAttribute owner.
[out]attr_infoHAPI_AttributeInfo to be filled. Check HAPI_AttributeInfo::exists to see if this attribute exists.
HAPI_DECL HAPI_GetAttributeInt64Data ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
int  stride,
HAPI_Int64 data_array,
int  start,
int  length 
)

Get attribute 64-bit integer data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]strideSpecifies how many items to skip over for each element. With a stride of -1, the stride will be set to attr_info->tuple_size. Otherwise, the stride will be set to the maximum of attr_info->tuple_size and stride.
[out]data_arrayAn 64-bit integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start. Note, if 0 is passed for length, the function will just do nothing and return HAPI_RESULT_SUCCESS.
HAPI_DECL HAPI_GetAttributeIntData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
int *  data_array,
int  start,
int  length 
)

Get attribute integer data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[out]data_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_GetAttributeNames ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_AttributeOwner  owner,
HAPI_StringHandle attribute_names_array,
int  count 
)

Get list of attribute names by attribute owner. Note that the name string handles are only valid until the next time this function is called.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]ownerThe HAPI_AttributeOwner enum value specifying the owner of the attribute.
[out]attribute_names_arrayArray of ints (string handles) to house the attribute names. Should be exactly the size of the appropriate attribute owner type count in HAPI_PartInfo.
[in]countSanity check count. Must be equal to the appropriate attribute owner type count in HAPI_PartInfo.
HAPI_DECL HAPI_GetAttributeStringData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
int *  data_array,
int  start,
int  length 
)

Get attribute string data. Note that the string handles returned are only valid until the next time this function is called.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[out]data_arrayAn int (string handles) array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_GetAvailableAssetCount ( const HAPI_Session session,
HAPI_AssetLibraryId  library_id,
int *  asset_count 
)

Get the number of assets contained in an asset library. You should call HAPI_LoadAssetLibraryFromFile() prior to get a library_id.

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]library_idReturned by HAPI_LoadAssetLibraryFromFile().
[out]asset_countThe number of assets contained in this asset library.
HAPI_DECL HAPI_GetAvailableAssets ( const HAPI_Session session,
HAPI_AssetLibraryId  library_id,
HAPI_StringHandle asset_names_array,
int  asset_count 
)

Get the names of the assets contained in an asset library.

The asset names will contain additional information about the type of asset, namespace, and version, along with the actual asset name. For example, if you have an Object type asset, in the "hapi" namespace, of version 2.0, named "foo", the asset name returned here will be: hapi::Object/foo::2.0

However, you should not need to worry about this detail. Just pass this string directly to HAPI_InstantiateAsset() to instantiate the asset. You can then get the pretty name using HAPI_GetAssetInfo().

You should call HAPI_LoadAssetLibraryFromFile() prior to get a library_id. Then, you should call HAPI_GetAvailableAssetCount() to get the number of assets to know how large of a string handles array you need to allocate.

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]library_idReturned by HAPI_LoadAssetLibraryFromFile().
[out]asset_names_arrayArray of string handles (integers) that should be at least the size of asset_count.
[out]asset_countShould be the same or less than the value returned by HAPI_GetAvailableAssetCount().
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.

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]cache_nameCache name from HAPI_GetActiveCacheNames().
[in]cache_propertyThe specific property of the cache to get the value for.
[out]property_valueReturned property value.
HAPI_DECL HAPI_GetCookingCurrentCount ( const HAPI_Session session,
int *  count 
)

Get current number of nodes that have already cooked in the current session. Note that this is a very crude approximation of the cooking progress - it may never make it to 100% or it might spend another hour at 100%. Use HAPI_GetStatusString to get a better idea of progress if this number gets stuck.

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.
[out]countCurrent cook count.
HAPI_DECL HAPI_GetCookingTotalCount ( const HAPI_Session session,
int *  count 
)

Get total number of nodes that need to cook in the current session.

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.
[out]countTotal cook count.
HAPI_DECL HAPI_GetCurveCounts ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int *  counts_array,
int  start,
int  length 
)

Retrieve the number of vertices for each curve in the part.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]counts_arrayThe number of cvs each curve contains
[in]startThe index of the first curve.
[in]lengthThe number of curves' counts to retrieve.
HAPI_DECL HAPI_GetCurveInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_CurveInfo info 
)

Retrieve any meta-data about the curves, including the curve's type, order, and periodicity.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]infoThe curve info represents the meta-data about the curves, including the type, order, and periodicity.
HAPI_DECL HAPI_GetCurveKnots ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
float *  knots_array,
int  start,
int  length 
)

Retrieve the knots of the curves in this part.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]knots_arrayThe knots of each curve will be returned in this array.
[in]startThe index of the first curve.
[in]lengthThe number of curves' knots to retrieve. The length of all the knots on a single curve is the order of that curve plus the number of vertices (see HAPI_GetCurveOrders(), and HAPI_GetCurveCounts()).
HAPI_DECL HAPI_GetCurveOrders ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int *  orders_array,
int  start,
int  length 
)

Retrieve the orders for each curve in the part if the curve has varying order.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]orders_arrayThe order of each curve will be returned in this array.
[in]startThe index of the first curve.
[in]lengthThe number of curves' orders to retrieve.
HAPI_DECL HAPI_GetEditableNodeNetworks ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_NodeId node_networks_array,
int  count 
)

Get the node ids of the editable node networks exposed by the asset author.

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]asset_idThe asset id.
[out]node_networks_arrayThe list of node networks' node ids. Should be an array exactly the size of: HAPI_AssetInfo::editableNodeNetworkCount.
[in]countShould be exactly HAPI_AssetInfo::editableNodeNetworkCount.
HAPI_DECL HAPI_GetEnvInt ( HAPI_EnvIntType  int_type,
int *  value 
)

Gives back a certain environment integers like version number. Note that you do not need a session for this. These constants are hard-coded in all HAPI implementations, including HARC and HAPIL. This should be the first API you call to determine if any future API calls will mismatch implementation.

Parameters
[in]int_typeOne of HAPI_EnvIntType.
[out]valueInt value.
HAPI_DECL HAPI_GetFaceCounts ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int *  face_counts_array,
int  start,
int  length 
)

Get the array of faces where the nth integer in the array is the number of vertices the nth face has.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]face_counts_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::faceCount - 1.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::faceCount - start.
HAPI_DECL HAPI_GetFirstVolumeTile ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_VolumeTileInfo tile 
)

Iterate through a volume based on 8x8x8 sections of the volume Start iterating through the value of the volume at part_id.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]tileThe tile info referring to the first tile in the volume at part_id.
HAPI_DECL HAPI_GetGeoInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_GeoInfo geo_info 
)

Get the main geometry info struct (HAPI_GeoInfo). Note that this function will reset all the geo_infos' HAPI_GeoInfo::hasGeoChanged flags to false after it returns the original flag values.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[out]geo_infoHAPI_GeoInfo return value.
HAPI_DECL HAPI_GetGeoSize ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_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().

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]formatThe file format, ie. "obj", "bgeo" etc.
[out]sizeThe size of the buffer required to hold the output.
HAPI_DECL HAPI_GetGroupMembership ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_GroupType  group_type,
const char *  group_name,
int *  membership_array,
int  start,
int  length 
)

Get group membership.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]group_typeThe group type.
[in]group_nameThe group name.
[out]membership_arrayArray of ints that represent the membership of this group. Should be the size given by HAPI_PartInfo_GetElementCountByGroupType() with group_type and the HAPI_PartInfo of part_id.
[in]startStart offset into the membership array. Must be less than HAPI_PartInfo_GetElementCountByGroupType().
[in]lengthShould be less than or equal to the size of membership.
HAPI_DECL HAPI_GetGroupNames ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_GroupType  group_type,
HAPI_StringHandle group_names_array,
int  group_count 
)

Get group names for an entire geo. Please note that this function is NOT per-part, but it is per-geo. The companion function HAPI_GetGroupMembership() IS per-part. Also keep in mind that the name string handles are only valid until the next time this function is called.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]group_typeThe group type.
[out]group_names_arrayThe array of names to be filled. Should be the size given by HAPI_GeoInfo_GetGroupCountByType() with group_type and the HAPI_GeoInfo of geo_id.
Note
These string handles are only valid until the next call to HAPI_GetGroupNames().
Parameters
[in]group_countSanity check. Should be less than or equal to the size of group_names.
HAPI_DECL HAPI_GetHandleBindingInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
int  handle_index,
HAPI_HandleBindingInfo handle_binding_infos_array,
int  start,
int  length 
)

Fill an array of HAPI_HandleInfo structs with information about every exposed user manipulation handle on the 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]asset_idThe asset id.
[in]handle_indexThe index of the handle, from 0 to handleCount - 1 from the call to HAPI_GetAssetInfo().
[out]handle_binding_infos_arrayArray of HAPI_HandleBindingInfo at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_HandleInfo::bindingsCount - 1.
[in]lengthMust be at least 0 and at most HAPI_HandleInfo::bindingsCount - start.
HAPI_DECL HAPI_GetHandleInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_HandleInfo handle_infos_array,
int  start,
int  length 
)

Fill an array of HAPI_HandleInfo structs with information about every exposed user manipulation handle on the 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]asset_idThe asset id.
[out]handle_infos_arrayArray of HAPI_HandleInfo at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AssetInfo::handleCount - 1.
[in]lengthMust be at least 1 and at most HAPI_AssetInfo::handleCount - start.
HAPI_DECL HAPI_GetImageInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
HAPI_ImageInfo image_info 
)

Get information about the image that was just rendered, like resolution and default file format. This information will be used when extracting planes to an image.

Note that you must call HAPI_RenderTextureToImage() first for this method call to make sense.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[out]image_infoThe struct containing the image information.
HAPI_DECL HAPI_GetImageMemoryBuffer ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
char *  buffer,
int  length 
)

Fill your allocated buffer with the just extracted image buffer.

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.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[out]bufferThe buffer passed in here will be filled with the image buffer created during the call to HAPI_ExtractImageToMemory().
[in]lengthSanity 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().
HAPI_DECL HAPI_GetImagePlaneCount ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
int *  image_plane_count 
)

Get the number of image planes for the just rendered image.

Note that you must call HAPI_RenderTextureToImage() first for this method call to make sense.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[out]image_plane_countThe number of image planes.
HAPI_DECL HAPI_GetImagePlanes ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
HAPI_StringHandle image_planes_array,
int  image_plane_count 
)

Get the names of the image planes of the just rendered image.

Note that you must call HAPI_RenderTextureToImage() first for this method call to make sense.

You should also call HAPI_GetImagePlaneCount() first to get the total number of image planes so you know how large the image_planes string handle array should be.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[out]image_planes_arrayThe image plane names.
[in]image_plane_countThe number of image planes to get names for. This must be less than or equal to the count returned by HAPI_GetImagePlaneCount().
HAPI_DECL HAPI_GetInputName ( const HAPI_Session session,
HAPI_AssetId  asset_id,
int  input_idx,
int  input_type,
HAPI_StringHandle name 
)

Get the name of an asset's input. This function will return a string handle for the name which will be valid (persist) until the next call to this function.

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]asset_idThe asset id.
[in]input_idxInput index of the asset.
[in]input_typeOf type HAPI_InputType.
[out]nameInput name string handle return value - valid until the next call to this function.
HAPI_DECL HAPI_GetInstancedPartIds ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_PartId instanced_parts_array,
int  start,
int  length 
)

Get the part ids that this instancer part is instancing.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe instancer part id.
[out]instanced_parts_arrayArray of HAPI_PartId's to instance.
[in]startShould be less than part_id's HAPI_PartInfo::instancedPartCount but more than or equal to 0.
[in]lengthShould be less than part_id's HAPI_PartInfo::instancedPartCount - start.
HAPI_DECL HAPI_GetInstancerPartTransforms ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transforms_array,
int  start,
int  length 
)

Get the instancer part's list of transforms on which to instance the instanced parts you got from HAPI_GetInstancedPartIds().

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe instancer part id.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transforms_arrayArray of HAPI_PartId's to instance.
[in]startShould be less than part_id's HAPI_PartInfo::instanceCount but more than or equal to 0.
[in]lengthShould be less than part_id's HAPI_PartInfo::instanceCount - start.
HAPI_DECL HAPI_GetInstanceTransforms ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transforms_array,
int  start,
int  length 
)

Fill an array of HAPI_Transform structs with the transforms of each instance of this instancer object.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transforms_arrayArray of HAPI_Transform at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::pointCount - 1.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::pointCount - start.
HAPI_DECL HAPI_GetMaterialIdsOnFaces ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_Bool are_all_the_same,
HAPI_MaterialId material_ids_array,
int  start,
int  length 
)

Get material ids by face/primitive. The material ids returned will be valid as long as the asset is alive. You should query this list after every cook to see if the material assignments have changed. You should also query each material individually using HAPI_GetMaterialInfo() to see if it is dirty and needs to be re-imported.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]are_all_the_same(optional) If true, all faces on this part have the same material assignment. You can pass NULL here.
[out]material_ids_arrayAn array of HAPI_MaterialId at least the size of length and at most the size of HAPI_PartInfo::faceCount.
[in]startThe starting index into the list of faces from which you wish to get the material ids from. Note that this should be less than HAPI_PartInfo::faceCount.
[in]lengthThe number of material ids you wish to get. Note that this should be at most: HAPI_PartInfo::faceCount - start.
HAPI_DECL HAPI_GetMaterialInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
HAPI_MaterialInfo material_info 
)

Get the material info.

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]asset_idThe asset id.
[in]material_idThe material id as given from HAPI_GetMaterialIdsOnFaces().
[out]material_infoThe returned material info.
HAPI_GetMaterialOnGroup ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  group_name,
HAPI_MaterialInfo material_info 
)

Get the material on a group. Use the HAPI_GetGroupMembership() call to determine where the material should be applied.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]group_nameThe group name.
[out]material_infoThe returned HAPI_MaterialInfo. If there is no material on this group the call will still succeed but the HAPI_MaterialInfo::exists will be set to false.
HAPI_GetMaterialOnPart ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_MaterialInfo material_info 
)

Get the material on a part.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]material_infoThe returned HAPI_MaterialInfo. If there is no material on this part the call will still succeed but the HAPI_MaterialInfo::exists will be set to false.
HAPI_DECL HAPI_GetNewAssetIds ( const HAPI_Session session,
HAPI_AssetId asset_ids_array,
int  new_asset_count 
)

Retrieves the asset ids from the previous call to HAPI_CheckForNewAssets().

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.
[out]asset_ids_arrayA buffer of length num_assets as returned by the call to HAPI_CheckForNewAssets(). When the function returns this buffer will be filled with the asset ids.
[in]new_asset_countMust be the new_asset_count you got from HAPI_CheckForNewAssets().
HAPI_DECL HAPI_GetNextVolumeTile ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_VolumeTileInfo tile 
)

Iterate through a volume based on 8x8x8 sections of the volume Continue iterating through the value of the volume at part_id.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]tileThe tile info referring to the next tile in the set of tiles associated with the volume at this part.
HAPI_DECL HAPI_GetNodeInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_NodeInfo node_info 
)

Fill an HAPI_NodeInfo struct.

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 node id.
[out]node_infoReturn value - contains things like asset id.
HAPI_DECL HAPI_GetNodeNetworkChildren ( const HAPI_Session session,
HAPI_NodeId  network_node_id,
HAPI_NodeId child_node_ids_array,
int  count 
)

Get the node ids of the children nodes of the specified parent node network.

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]network_node_idThe parent node network's node id.
[out]child_node_ids_arrayThe list of child nodes' node ids. Should be an array exactly the size of: HAPI_NodeInfo::childNodeCount.
[in]countShould be exactly HAPI_NodeInfo::childNodeCount.
HAPI_DECL HAPI_GetObjects ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectInfo object_infos_array,
int  start,
int  length 
)

Fill an array of HAPI_ObjectInfo structs with information on each visible object in the scene that has a SOP network (is not a sub-network). Note that this function will reset all the objects' HAPI_ObjectInfo.haveGeosChanged flags to false after it returns the original flag values.

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]asset_idThe asset id.
[out]object_infos_arrayArray of HAPI_ObjectInfo at least the size of length.
[in]startFirst object index to begin fill. Must be at least 0 and at most length - 1.
[in]lengthMust be at least 0 and at most HAPI_AssetInfo::objectCount - start.
HAPI_DECL HAPI_GetObjectTransforms ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transforms_array,
int  start,
int  length 
)

Fill an array of HAPI_Transform structs with the transforms of each visible object in the scene that has a SOP network (is not a sub-network). Note that this function will reset all the objects' HAPI_ObjectInfo::hasTransformChanged flags to false after it returns the original flag values.

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]asset_idThe asset id.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transforms_arrayArray of HAPI_Transform at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AssetInfo::objectCount - 1.
[in]lengthMust be at least 0 and at most HAPI_AssetInfo::objectCount - start.
HAPI_DECL HAPI_GetParameters ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmInfo parm_infos_array,
int  start,
int  length 
)

Fill an array of HAPI_ParmInfo structs with parameter information from the asset instance node.

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 node id.
[out]parm_infos_arrayArray of HAPI_ParmInfo at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmCount - 1.
[in]lengthMust be at least 0 and at most HAPI_NodeInfo::parmCount - start.
HAPI_DECL HAPI_GetParmChoiceLists ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmChoiceInfo parm_choices_array,
int  start,
int  length 
)

Fill an array of HAPI_ParmChoiceInfo structs with parameter choice list information from the asset instance node.

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 node id.
[out]parm_choices_arrayArray of HAPI_ParmChoiceInfo exactly the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmChoiceCount - 1.
[in]lengthMust be at least 1 and at most HAPI_NodeInfo::parmChoiceCount - start.
HAPI_DECL HAPI_GetParmFloatValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
float *  value 
)

Get single parm float value by name.

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 node id.
[in]parm_nameThe parm name.
[in]indexIndex within the parameter's values tuple.
[out]valueThe returned float value.
HAPI_DECL HAPI_GetParmFloatValues ( const HAPI_Session session,
HAPI_NodeId  node_id,
float *  values_array,
int  start,
int  length 
)

Fill an array of parameter float values. This is more efficient than calling HAPI_GetParmFloatValue() individually for each parameter value.

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 node id.
[out]values_arrayArray of floats at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmFloatValueCount - 1.
[in]lengthMust be at least 1 and at most HAPI_NodeInfo::parmFloatValueCount - start.
HAPI_DECL HAPI_GetParmIdFromName ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
HAPI_ParmId parm_id 
)

All parameter APIs require a HAPI_ParmId but if you know the parameter you wish to operate on by name than you can use this function to get its HAPI_ParmId. If the parameter with the given name is not found the parameter id returned will be -1.

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 node id.
[in]parm_nameThe parm name.
[out]parm_idThe return value. The parameter's HAPI_ParmId. If the parameter with the given name is not found the parameter id returned will be -1.
HAPI_DECL HAPI_GetParmInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
HAPI_ParmInfo parm_info 
)

Get the parm info of a parameter by parm id.

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 node id.
[in]parm_idThe parm id.
[out]parm_infoThe returned parm info.
HAPI_DECL HAPI_GetParmInfoFromName ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
HAPI_ParmInfo parm_info 
)

Get the parm info of a parameter by name.

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 node id.
[in]parm_nameThe parm name.
[out]parm_infoThe returned parm info.
HAPI_DECL HAPI_GetParmIntValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
int *  value 
)

Get single parm int value by name.

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 node id.
[in]parm_nameThe parm name.
[in]indexIndex within the parameter's values tuple.
[out]valueThe returned int value.
HAPI_DECL HAPI_GetParmIntValues ( const HAPI_Session session,
HAPI_NodeId  node_id,
int *  values_array,
int  start,
int  length 
)

Fill an array of parameter int values. This is more efficient than calling HAPI_GetParmIntValue() individually for each parameter value.

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 node id.
[out]values_arrayArray of ints at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmIntValueCount - 1.
[in]lengthMust be at least 0 and at most HAPI_NodeInfo::parmIntValueCount - start.
HAPI_DECL HAPI_GetParmStringValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
HAPI_Bool  evaluate,
HAPI_StringHandle value 
)

Get single parm string value by name.

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 node id.
[in]parm_nameThe name of the parameter.
[in]indexIndex within the parameter's values tuple.
[in]evaluateWhether or not to evaluate the string expression. For example, the string "$F" would evaluate to the current frame number. So, passing in evaluate = false would give you back the string "$F" and passing in evaluate = true would give you back "1" (assuming the current frame is 1).
[out]valueThe returned string value.
HAPI_DECL HAPI_GetParmStringValues ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_Bool  evaluate,
HAPI_StringHandle values_array,
int  start,
int  length 
)

Fill an array of parameter string handles. These handles must be used in conjunction with HAPI_GetString() to get the actual string values. This is more efficient than calling HAPI_GetParmStringValue() individually for each parameter value.

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 node id.
[in]evaluateWhether or not to evaluate the string expression. For example, the string "$F" would evaluate to the current frame number. So, passing in evaluate = false would give you back the string "$F" and passing in evaluate = true would give you back "1" (assuming the current frame is 1).
[out]values_arrayArray of ints at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmStringValueCount - 1.
[in]lengthMust be at least 1 and at most HAPI_NodeInfo::parmStringValueCount - start.
HAPI_DECL HAPI_GetPartInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_PartInfo part_info 
)

Get a particular part info struct.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]part_infoHAPI_PartInfo return value.
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_GetServerEnvInt ( const HAPI_Session session,
const char *  variable_name,
int *  value 
)

Get environment variable from the server process as an integer.

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]variable_nameName of the environmnet variable.
[out]valueThe int pointer to return the value in.
HAPI_DECL HAPI_GetServerEnvString ( const HAPI_Session session,
const char *  variable_name,
HAPI_StringHandle value 
)

Get environment variable from the server process as a string.

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]variable_nameName of the environmnet variable.
[out]valueThe HAPI_StringHandle pointer to return the value in.
HAPI_DECL HAPI_GetSessionEnvInt ( const HAPI_Session session,
HAPI_SessionEnvIntType  int_type,
int *  value 
)

Gives back a certain session-specific environment integers like current license type being used.

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]int_typeOne of HAPI_SessionEnvIntType.
[out]valueInt value.
HAPI_DECL HAPI_GetStatus ( const HAPI_Session session,
HAPI_StatusType  status_type,
int *  status 
)

Gives back the status code for a specific status type.

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]status_typeOne of HAPI_StatusType.
[out]statusActual status code for the status type given. That is, if you pass in HAPI_STATUS_CALL_RESULT as status_type, you'll get back a HAPI_Result for this argument. If you pass in HAPI_STATUS_COOK_STATE as status_type, you'll get back a HAPI_State enum for this argument.
HAPI_DECL HAPI_GetStatusString ( const HAPI_Session session,
HAPI_StatusType  status_type,
char *  string_value,
int  length 
)

Return status string message.

You MUST call HAPI_GetStatusStringBufLength() before calling HAPI_GetStatusString() because HAPI_GetStatusString() will not return the real status string and instead return a cached version of the string that was created inside HAPI_GetStatusStringBufLength(). The reason for this is that the length of the real status string may change between the call to HAPI_GetStatusStringBufLength() and the call to HAPI_GetStatusString().

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]status_typeOne of HAPI_StatusType.
[out]string_valueBuffer char array ready to be filled.
[in]lengthLength of the string buffer (must match size of string_value - so including NULL terminator).
HAPI_DECL HAPI_GetStatusStringBufLength ( const HAPI_Session session,
HAPI_StatusType  status_type,
HAPI_StatusVerbosity  verbosity,
int *  buffer_length 
)

Return length of string buffer storing status string message.

If called with HAPI_STATUS_COOK_RESULT this will actually parse the node networks for the previously cooked asset(s) and aggregate all node errors, warnings, and messages (depending on the verbosity level set). Usually this is done just for the last cooked single asset but if you load a whole Houdini scene using HAPI_LoadHIPFile() then you'll have multible "previously cooked assets".

You MUST call HAPI_GetStatusStringBufLength() before calling HAPI_GetStatusString() because HAPI_GetStatusString() will not return the real status string and instead return a cached version of the string that was created inside HAPI_GetStatusStringBufLength(). The reason for this is that the length of the real status string may change between the call to HAPI_GetStatusStringBufLength() and the call to HAPI_GetStatusString().

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]status_typeOne of HAPI_StatusType.
[in]verbosityPreferred verbosity level.
[out]buffer_lengthLength of buffer char array ready to be filled.
HAPI_DECL HAPI_GetString ( const HAPI_Session session,
HAPI_StringHandle  string_handle,
char *  string_value,
int  length 
)

Gives back the string value of the string with the given handle.

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]string_handleHandle of the string to query.
[out]string_valueActual string value (character array).
[in]lengthLength of the string buffer (must match size of string_value - so including NULL terminator).
HAPI_DECL HAPI_GetStringBufLength ( const HAPI_Session session,
HAPI_StringHandle  string_handle,
int *  buffer_length 
)

Gives back the string length of the string with the given handle.

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]string_handleHandle of the string to query.
[out]buffer_lengthBuffer length of the queried string (including NULL terminator).
HAPI_DECL HAPI_GetSupportedImageFileFormatCount ( const HAPI_Session session,
int *  file_format_count 
)

Get the number of supported texture file formats.

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.
[out]file_format_countThe number of supported texture file formats.
HAPI_DECL HAPI_GetSupportedImageFileFormats ( const HAPI_Session session,
HAPI_ImageFileFormat formats_array,
int  file_format_count 
)

Get a list of support image file formats - their names, descriptions and a list of recognized extensions.

Note that you MUST call HAPI_GetSupportedImageFileFormatCount() before calling this function for the first time.

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.
[out]formats_arrayThe list of HAPI_ImageFileFormat structs to be filled.
[in]file_format_countThe number of supported texture file formats. This should be at least as large as the count returned by HAPI_GetSupportedImageFileFormatCount().
HAPI_DECL HAPI_GetTime ( const HAPI_Session session,
float *  time 
)

Gets the global time of the scene. All API calls deal with this time to cook.

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.
[out]timeTime as a float in seconds.
HAPI_DECL HAPI_GetTimelineOptions ( const HAPI_Session session,
HAPI_TimelineOptions timeline_options 
)

Gets the current global timeline options.

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]timeline_optionsThe global timeline options struct.
HAPI_DECL HAPI_GetVertexList ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int *  vertex_list_array,
int  start,
int  length 
)

Get array containing the vertex-point associations where the ith element in the array is the point index the ith vertex associates with.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]vertex_list_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::vertexCount - 1.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::vertexCount - start.
HAPI_DECL HAPI_GetVolumeInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
HAPI_VolumeInfo volume_info 
)

Retrieve any meta-data about the volume primitive, including its transform, location, scale, taper, resolution.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[out]volume_infoThe meta-data associated with the volume on the part specified by the previous parameters.
HAPI_DECL HAPI_GetVolumeTileFloatData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
float  fill_value,
const HAPI_VolumeTileInfo tile,
float *  values_array,
int  length 
)

Retrieve floating point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]fill_valueValue that will be used to fill the values_array. This is useful so that you can see what values have actually been written to.
[in]tileThe tile to retrieve.
[out]values_arrayThe values of the tile.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_GetVolumeTileIntData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int  fill_value,
const HAPI_VolumeTileInfo tile,
int *  values_array,
int  length 
)

Retrieve integer point values of the voxels pointed to by a tile. Note that a tile may extend beyond the limits of the volume so not all values in the given buffer will be written to. Voxels outside the volume will be initialized to the given fill value.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]fill_valueValue that will be used to fill the values_array. This is useful so that you can see what values have actually been written to.
[in]tileThe tile to retrieve.
[out]values_arrayThe values of the tile.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_GetVolumeVoxelFloatData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
float *  values_array,
int  value_count 
)

Retrieve floating point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]x_indexThe x index/coordinate of the voxel.
[in]y_indexThe y index/coordinate of the voxel.
[in]z_indexThe z index/coordinate of the voxel.
[out]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_GetVolumeVoxelIntData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
int *  values_array,
int  value_count 
)

Retrieve integer point values of the voxel at a specific index. Note that you must call HAPI_GetVolumeInfo() prior to this call.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idThe part id.
[in]x_indexThe x index/coordinate of the voxel.
[in]y_indexThe y index/coordinate of the voxel.
[in]z_indexThe z index/coordinate of the voxel.
[out]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_Initialize ( const HAPI_Session session,
const HAPI_CookOptions cook_options,
HAPI_Bool  use_cooking_thread,
int  cooking_thread_stack_size,
const char *  otl_search_path,
const char *  dso_search_path,
const char *  image_dso_search_path,
const char *  audio_dso_search_path 
)

Create the asset manager, set up environment variables, and initialize the main Houdini scene. No license checking is during this step. Only when you try to load an asset library (OTL) do we actually check for licenses.

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]cook_optionsGlobal cook options used by subsequent default cooks. This can be overwritten by individual cooks but if you choose to instantiate assets with cook_on_load set to true then these cook options will be used.
[in]use_cooking_threadUse a separate thread for cooking of assets. This allows for asynchronous cooking and larger stack size.
[in]cooking_thread_stack_sizeSet the stack size of the cooking thread. Use -1 to set the stack size to the Houdini default. This value is in bytes.
[in]otl_search_pathThe directory where OTLs are searched for. You can pass NULL here which will only use the default Houdini OTL search paths. You can also pass in multiple paths separated by a ";" on Windows and a ":" on Linux and Mac. If something other than NULL is passed the default Houdini search paths will be appended to the end of the path string.
[in]dso_search_pathThe directory where generic DSOs (custom plugins) are searched for. You can pass NULL here which will only use the default Houdini DSO search paths. You can also pass in multiple paths separated by a ";" on Windows and a ":" on Linux and Mac. If something other than NULL is passed the default Houdini search paths will be appended to the end of the path string.
[in]image_dso_search_pathThe directory where image DSOs (custom plugins) are searched for. You can pass NULL here which will only use the default Houdini DSO search paths. You can also pass in multiple paths separated by a ";" on Windows and a ":" on Linux and Mac. If something other than NULL is passed the default Houdini search paths will be appended to the end of the path string.
[in]audio_dso_search_pathThe directory where audio DSOs (custom plugins) are searched for. You can pass NULL here which will only use the default Houdini DSO search paths. You can also pass in multiple paths separated by a ";" on Windows and a ":" on Linux and Mac. If something other than NULL is passed the default Houdini search paths will be appended to the end of the path string.

[HAPI_Initialize]

HAPI_DECL HAPI_InsertMultiparmInstance ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
int  instance_position 
)

Insert an instance of a multiparm before instance_position.

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 node id.
[in]parm_idA parm id given by a HAPI_ParmInfo struct that has type HAPI_PARMTYPE_MULTIPARMLIST.
[in]instance_positionThe new instance will be inserted at this position index. Do note the multiparms can start at position 1 or 0. Use HAPI_ParmInfo::instanceStartOffset to distinguish.
HAPI_DECL HAPI_InstantiateAsset ( const HAPI_Session session,
const char *  asset_name,
HAPI_Bool  cook_on_load,
HAPI_AssetId asset_id 
)

Instantiate an asset by name. The asset has to have been loaded as part of an asset library, using HAPI_LoadAssetLibraryFromFile().

Note
In threaded mode, this is an async call!
This is also when we actually check for valid licenses.

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately with a call result of HAPI_RESULT_SUCCESS, even if fed garbage. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the instatiation (and, optionally, the first cook) has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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]asset_nameThe name of the asset to load. Use HAPI_GetAvailableAssets() to get the available asset names in a loaded asset library.
[out]cook_on_loadSet to true if you wish the asset to cook as soon as it is instantiated. Otherwise, you will have to call HAPI_CookAsset() explicitly after you call this function.

Normally you should set this to true but if you want to change parameters on an asset before the first cook set this to false. You can then use HAPI_GetAssetInfo() to get the node_id of the asset and use the parameter APIs to update the values. Then, call HAPI_CookAsset() explicitly. To know whether an asset as cooked at least once there is a flag in HAPI_AssetInfo called hasEverCooked.

Parameters
[out]asset_idNewly created asset's id. Use HAPI_GetAssetInfo() to get more information about the asset.
HAPI_DECL HAPI_Interrupt ( const HAPI_Session session)

Interrupt a cook or load operation.

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.
HAPI_DECL HAPI_IsAssetValid ( const HAPI_Session session,
HAPI_AssetId  asset_id,
int  asset_validation_id,
int *  answer 
)

Determine if your instance of the asset actually still exists inside the Houdini scene. This is what can be used to determine when the Houdini scene needs to be re-populated using the host application's instances of the assets. Note that this function will ALWAYS return HAPI_RESULT_SUCCESS.

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]asset_idThe asset id.
[in]asset_validation_idThe asset validation id that's found in the HAPI_AssetInfo struct returned by HAPI_GetAssetInfo.
[out]answerAnswer to the question. 1 for valid, 0 for invalid.
HAPI_DECL HAPI_IsInitialized ( const HAPI_Session session)

Check whether the runtime has been initialized yet using HAPI_Initialize(). Function will return HAPI_RESULT_SUCCESS if the runtime has been initialized and HAPI_RESULT_FAILURE otherwise.

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.
HAPI_DECL HAPI_IsSessionValid ( const HAPI_Session session)

Checks whether the session identified by HAPI_Session::id is a valid session opened in the implementation identified by HAPI_Session::type.

Parameters
[in]sessionThe HAPI_Session to check.
Returns
HAPI_RESULT_SUCCESS if the session is valid. Otherwise, the session is invalid and passing it to other HAPI calls may result in undefined behavior.
HAPI_DECL HAPI_LoadAssetLibraryFromFile ( const HAPI_Session session,
const char *  file_path,
HAPI_Bool  allow_overwrite,
HAPI_AssetLibraryId library_id 
)

Loads a Houdini asset library (OTL) from a .otl file. It does NOT instantiate anything inside the Houdini scene.

Note
This is when we actually check for valid licenses.

The next step is to call HAPI_GetAvailableAssetCount() to get the number of assets contained in the library using the returned library_id. Then call HAPI_GetAvailableAssets() to get the list of available assets by name. Use the asset names with HAPI_InstantiateAsset() to actually instantiate one of these assets in the Houdini scene and get back an asset_id.

Note
The HIP file saved using HAPI_SaveHIPFile() will only have an absolute path reference to the loaded OTL meaning that if the OTL is moved or renamed the HIP file won't load properly. It also means that if you change the OTL using the saved HIP scene the same OTL file will change as the one used with Houdini Engine. See Saving a HIP File.
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]file_pathAbsolute path to the .otl file.
[in]allow_overwriteWith this true, if the library file being loaded contains asset defintions that have already been loaded they will overwrite the existing definitions. Otherwise, a library containing asset defintions that already exist will fail to load, returning a HAPI_Result of HAPI_RESULT_ASSET_DEF_ALREADY_LOADED.
[out]library_idNewly loaded otl id to be used with HAPI_GetAvailableAssetCount() and HAPI_GetAvailableAssets().
HAPI_DECL HAPI_LoadAssetLibraryFromMemory ( const HAPI_Session session,
const char *  library_buffer,
int  library_buffer_length,
HAPI_Bool  allow_overwrite,
HAPI_AssetLibraryId library_id 
)

Loads a Houdini asset library (OTL) from memory. It does NOT instantiate anything inside the Houdini scene.

Note
This is when we actually check for valid licenses.

Please note that the performance benefit of loading a library from memory are negligible at best. Due to limitations of Houdini's library manager, there is still some disk access and file writes because every asset library needs to be saved to a real file. Use this function only as a convenience if you already have the library file in memory and don't wish to have to create your own temporary library file and then call HAPI_LoadAssetLibraryFromFile().

The next step is to call HAPI_GetAvailableAssetCount() to get the number of assets contained in the library using the returned library_id. Then call HAPI_GetAvailableAssets() to get the list of available assets by name. Use the asset names with HAPI_InstantiateAsset() to actually instantiate one of these assets in the Houdini scene and get back an asset_id.

Note
The saved HIP file using HAPI_SaveHIPFile() will contain the OTL loaded as part of its Embedded OTLs. This means that you can safely move or rename the original OTL file and the HIP will continue to work but if you make changes to the OTL while using the saved HIP the changes won't be saved to the original OTL. See Saving a HIP File.
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]library_bufferThe memory buffer containing the asset definitions in the same format as a standard Houdini .otl file.
[in]library_buffer_lengthThe size of the OTL memory buffer.
[in]allow_overwriteWith this true, if the library file being loaded contains asset defintions that have already been loaded they will overwrite the existing definitions. Otherwise, a library containing asset defintions that already exist will fail to load, returning a HAPI_Result of HAPI_RESULT_ASSET_DEF_ALREADY_LOADED.
[out]library_idNewly loaded otl id to be used with HAPI_GetAvailableAssetCount() and HAPI_GetAvailableAssets().
HAPI_DECL HAPI_LoadGeoFromFile ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  file_name 
)

Loads a geometry file and put its contents onto a SOP node.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]file_nameThe name of the file to be loaded
HAPI_DECL HAPI_LoadGeoFromMemory ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  format,
const char *  buffer,
int  length 
)

Loads a geometry from memory and put its contents onto a SOP node.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]formatThe file format, ie. "obj", "bgeo" etc.
[in]bufferThe buffer we will read the geomtry from.
[in]lengthThe size of the buffer passed in.
HAPI_DECL HAPI_LoadHIPFile ( const HAPI_Session session,
const char *  file_name,
HAPI_Bool  cook_on_load 
)

Loads a .hip file into the main Houdini scene.

Note
In threaded mode, this is an async call!
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]file_nameAbsolute path to the .hip file to load.
[in]cook_on_loadSet to true if you wish the assets to cook as soon as they are instantiated. Otherwise, you will have to call HAPI_CookAsset() explicitly for each after you call this function.
HAPI_DECL HAPI_PythonThreadInterpreterLock ( const HAPI_Session session,
HAPI_Bool  locked 
)

Acquires or releases the Python interpreter lock. This is needed if HAPI is called from Python and HAPI is in threaded mode (see HAPI_Initialize()).

The problem arises when async functions like HAPI_InstantiateAsset() may start a cooking thread that may try to run Python code. That is, we would now have Python running on two different threads - something not allowed by Python by default.

We need to tell Python to explicitly "pause" the Python state on the client thread while we run Python in our cooking thread.

You must call this function first with locked == true before any async HAPI call. Then, after the async call finished, detected via calls to HAPI_GetStatus(), call this method again to release the lock with locked == false.

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]lockedTrue will acquire the interpreter lock to use it for the HAPI cooking thread. False will release the lock back to the client thread.
HAPI_DECL HAPI_QueryNodeInput ( const HAPI_Session session,
HAPI_NodeId  node_to_query,
int  input_index,
HAPI_NodeId connected_node_id 
)

Query which node is connected to another node's input.

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_to_queryThe node to query.
[in]input_indexThe input index. Should be between 0 and the to_node's HAPI_NodeInfo::inputCount.
[out]connected_node_idThe node id of the connected node to this input. If nothing is connected then -1 will be returned.
HAPI_DECL HAPI_RemoveMultiparmInstance ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
int  instance_position 
)

Remove the instance of a multiparm given by instance_position.

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 node id.
[in]parm_idA parm id given by a HAPI_ParmInfo struct that has type HAPI_PARMTYPE_MULTIPARMLIST.
[in]instance_positionThe instance at instance_position will removed.
HAPI_DECL HAPI_RenameNode ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  new_name 
)

Rename a node that you created. Only nodes with their HAPI_NodeInfo::createdPostAssetLoad set to true can be deleted this way.

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 node to delete.
[in]new_nameThe new node name.
HAPI_DECL HAPI_RenderTextureToImage ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
HAPI_ParmId  parm_id 
)

Render only a single texture to an image for later extraction. An example use of this method might be to render the diffuse, normal, and bump texture maps of a material to individual texture files for use within the client application.

Note that you must call this first for any of the other material APIs to work.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[in]parm_idThis is the index in the parameter list of the material_id's node of the parameter containing the texture map file path.
HAPI_DECL HAPI_ResetSimulation ( const HAPI_Session session,
HAPI_AssetId  asset_id 
)

Resets the simulation cache of the asset. This is very useful for assets that use dynamics, to be called after some setup has changed for the asset - for example, asset inputs.

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]asset_idThe asset id.
HAPI_DECL HAPI_RevertGeo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id 
)

Remove all changes that have been committed to this geometry. Only applies to geometry nodes that are exposed edit nodes.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
HAPI_DECL HAPI_SaveGeoToFile ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_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.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]file_nameThe name of the file to be saved. The extension of the file determines its type.
HAPI_DECL HAPI_SaveGeoToMemory ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_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.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[out]bufferThe buffer we will write into.
[in]lengthThe size of the buffer passed in.
HAPI_DECL HAPI_SaveHIPFile ( const HAPI_Session session,
const char *  file_path,
HAPI_Bool  lock_nodes 
)

Saves a .hip file of the current Houdini scene.

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]file_pathAbsolute path to the .hip file to save to.
[in]lock_nodesSpecify whether to lock all SOP nodes before saving the scene file. This way, when you load the scene file you can see exactly the state of each SOP at the time it was saved instead of relying on the re-cook to accurately reproduce the state. It does, however, take a lot more space and time locking all nodes like this.
HAPI_DECL HAPI_SetAnimCurve ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
int  parm_index,
const HAPI_Keyframe curve_keyframes_array,
int  keyframe_count 
)

Set an animation curve on a parameter of an exposed node.

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]parm_idThe id of an exposed parameter within the node.
[in]parm_indexThe index of the parameter, if it is for example a 3 tuple
[in]curve_keyframes_arrayAn array of HAPI_Keyframe structs that describes the keys on this curve.
[in]keyframe_countThe number of keys on the curve.
HAPI_DECL HAPI_SetAssetTransform ( const HAPI_Session session,
HAPI_AssetId  asset_id,
const HAPI_TransformEuler transform 
)

Set the transform of an asset to match the transform of the asset on the client side.

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]asset_idThe asset id.
[in]transformThe actual transform struct.
HAPI_DECL HAPI_SetAttributeFloat64Data ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  name,
const HAPI_AttributeInfo attr_info,
const double *  data_array,
int  start,
int  length 
)

Set 64-bit attribute float data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]data_arrayAn 64-bit float array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_SetAttributeFloatData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  name,
const HAPI_AttributeInfo attr_info,
const float *  data_array,
int  start,
int  length 
)

Set attribute float data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]data_arrayAn float array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_SetAttributeInt64Data ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  name,
const HAPI_AttributeInfo attr_info,
const HAPI_Int64 data_array,
int  start,
int  length 
)

Set 64-bit attribute integer data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]data_arrayAn 64-bit integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_SetAttributeIntData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  name,
const HAPI_AttributeInfo attr_info,
const int *  data_array,
int  start,
int  length 
)

Set attribute integer data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]data_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
HAPI_DECL HAPI_SetAttributeStringData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const char *  name,
const HAPI_AttributeInfo attr_info,
const char **  data_array,
int  start,
int  length 
)

Set attribute string data.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo used as input for what tuple size. you want. Also contains some sanity checks like data type. Generally should be the same struct returned by HAPI_GetAttributeInfo().
[in]data_arrayA strings array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_AttributeInfo::count - 1.
[in]lengthMust be at least 0 and at most HAPI_AttributeInfo::count - start.
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.

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]cache_nameCache name from HAPI_GetActiveCacheNames().
[in]cache_propertyThe specific property of the cache to modify.
[in]property_valueThe new property value.
HAPI_DECL HAPI_SetCurveCounts ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const int *  counts_array,
int  start,
int  length 
)

Set the number of vertices for each curve in the part.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idCurrently unused. Input asset geos are assumed to have only one part.
[in]counts_arrayThe number of cvs each curve contains.
[in]startThe index of the first curve.
[in]lengthThe number of curves' counts to set.
HAPI_DECL HAPI_SetCurveInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const HAPI_CurveInfo info 
)

Set meta-data for the curve mesh, including the curve type, order, and periodicity.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idCurrently unused. Input asset geos are assumed to have only one part.
[in]infoThe curve info represents the meta-data about the curves, including the type, order, and periodicity.
HAPI_DECL HAPI_SetCurveKnots ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const float *  knots_array,
int  start,
int  length 
)

Set the knots of the curves in this part.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idCurrently unused. Input asset geos are assumed to have only one part.
[in]knots_arrayThe knots of each curve.
[in]startThe index of the first curve.
[in]lengthThe number of curves' knots to set. The length of all the knots on a single curve is the order of that curve plus the number of vertices (see HAPI_SetCurveOrders(), and HAPI_SetCurveCounts()).
HAPI_DECL HAPI_SetCurveOrders ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_PartId  part_id,
const int *  orders_array,
int  start,
int  length 
)

Set the orders for each curve in the part if the curve has varying order.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_idCurrently unused. Input asset geos are assumed to have only one part.
[in]orders_arrayThe orders of each curve.
[in]startThe index of the first curve.
[in]lengthThe number of curves' orders to retrieve.
HAPI_DECL HAPI_SetEnvFiles ( const HAPI_Session session,
const char *  houdini_environment_files 
)

[HAPI_Initialize]

Set custom .env files. You MUST call this function just before the HAPI_Initialize() call for it to take affect.

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]houdini_environment_filesA list of paths, separated by a ";" on Windows and a ":" on Linux and Mac, to .env files that follow the same syntax as the houdini.env file in Houdini's user prefs folder. These will be applied after the default houdini.env file and will overwrite the process' environment variable values. You an use this to enforce a stricter environment when running engine. For more info, see: http://www.sidefx.com/docs/houdini/basics/config_env
HAPI_DECL HAPI_SetFaceCounts ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const int *  face_counts_array,
int  start,
int  length 
)

Set the array of faces where the nth integer in the array is the number of vertices the nth face has.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]face_counts_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::faceCount - 1.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::faceCount - start.
HAPI_DECL HAPI_SetGeoInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_GeoInfo geo_info 
)

Set the main geometry info struct (HAPI_GeoInfo). TODO: This function does nothing at the moment. (Placeholder)

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]geo_infoHAPI_GeoInfo value.
HAPI_DECL HAPI_SetGroupMembership ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
HAPI_GroupType  group_type,
const char *  group_name,
const int *  membership_array,
int  start,
int  length 
)

Set group membership.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]group_typeThe group type.
[in]group_nameThe group name.
[in]membership_arrayArray of ints that represent the membership of this group. Should be the size given by HAPI_PartInfo_GetElementCountByGroupType() with group_type and the HAPI_PartInfo of part_id.
[in]startStart offset into the membership array. Must be less than HAPI_PartInfo_GetElementCountByGroupType().
[in]lengthShould be less than or equal to the size of membership.
HAPI_DECL HAPI_SetImageInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_MaterialId  material_id,
const HAPI_ImageInfo image_info 
)

Set image information like resolution and file format. This information will be used when extracting planes to an image.

Note that you must call HAPI_RenderTextureToImage() first for this method call to make sense.

You should also first call HAPI_GetImageInfo() to get the current Image Info and change only the properties you don't like.

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]asset_idThe asset id.
[in]material_idThe material id as given in HAPI_MaterialInfo.
[in]image_infoThe struct containing the new image information.
HAPI_DECL HAPI_SetObjectTransform ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
const HAPI_TransformEuler transform 
)

Set the transform of an individual object. This is mostly used with marshaled geometry objects. Trying to modify the transform of an object belonging to an asset other than the special External Input Asset with object id 0 will most likely fail, unless the transforms are exposed as editable via exposed parameters.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]transformA HAPI_TransformEuler that stores the transform.
HAPI_DECL HAPI_SetParmFloatValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
float  value 
)

Set single parm float value by name.

Note
Regardless of the value, when calling this function on a parameter, if that parameter has a callback function attached to it, that callback function will be called. For example, if the parameter is a button the button will be pressed.
In threaded mode, this is an async call!

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the cook operation has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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 node id.
[in]parm_nameThe parm name.
[in]indexIndex within the parameter's values tuple.
[in]valueThe float value.
HAPI_DECL HAPI_SetParmFloatValues ( const HAPI_Session session,
HAPI_NodeId  node_id,
const float *  values_array,
int  start,
int  length 
)

Set (push) an array of parameter float values.

Note
Regardless of the values, when calling this function on a set of parameters, if any parameter has a callback function attached to it, that callback function will be called. For example, if the parameter is a button the button will be pressed.
In threaded mode, this is an async call!

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the cook operation has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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 node id.
[in]values_arrayArray of floats at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmFloatValueCount - 1.
[in]lengthMust be at least 1 and at most HAPI_NodeInfo::parmFloatValueCount - start.
HAPI_DECL HAPI_SetParmIntValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
int  value 
)

Set single parm int value by name.

Note
Regardless of the value, when calling this function on a parameter, if that parameter has a callback function attached to it, that callback function will be called. For example, if the parameter is a button the button will be pressed.
In threaded mode, this is an async call!

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the cook operation has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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 node id.
[in]parm_nameThe parm name.
[in]indexIndex within the parameter's values tuple.
[in]valueThe int value.
HAPI_DECL HAPI_SetParmIntValues ( const HAPI_Session session,
HAPI_NodeId  node_id,
const int *  values_array,
int  start,
int  length 
)

Set (push) an array of parameter int values.

Note
Regardless of the values, when calling this function on a set of parameters, if any parameter has a callback function attached to it, that callback function will be called. For example, if the parameter is a button the button will be pressed.
In threaded mode, this is an async call!

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the cook operation has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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 node id.
[in]values_arrayArray of ints at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_NodeInfo::parmIntValueCount - 1.
[in]lengthMust be at least 1 and at most HAPI_NodeInfo::parmIntValueCount - start.
HAPI_DECL HAPI_SetParmStringValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  value,
HAPI_ParmId  parm_id,
int  index 
)

Set (push) a string value. We can only set a single value at a time because we want to avoid fixed size string buffers.

Note
Regardless of the value, when calling this function on a parameter, if that parameter has a callback function attached to it, that callback function will be called. For example, if the parameter is a button the button will be pressed.
In threaded mode, this is an async call!

This API will invoke the cooking thread if threading is enabled. This means it will return immidiately. Use the status and cooking count APIs under DIAGNOSTICS to get a sense of the progress. All other API calls will block until the cook operation has finished.

Also note that the cook result won't be of type HAPI_STATUS_CALL_RESULT like all calls (including this one). Whenever the threading cook is done it will fill the cook result which is queried using HAPI_STATUS_COOK_RESULT.

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 node id.
[in]valueThe string value.
[in]parm_idParameter id of the parameter being updated.
[in]indexIndex within the parameter's values tuple.
HAPI_DECL HAPI_SetPartInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const HAPI_PartInfo part_info 
)

Set the main part info struct (HAPI_PartInfo).

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]part_infoHAPI_PartInfo value that describes the input geometry.
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.
HAPI_DECL HAPI_SetServerEnvInt ( const HAPI_Session session,
const char *  variable_name,
int  value 
)

Set environment variable for the server process as an integer.

Note that this may affect other sessions on the same server process. The session parameter is mainly there to identify the server process, not the specific session.

For in-process sessions, this will affect the current process's environment.

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]variable_nameName of the environmnet variable.
[in]valueThe integer value.
HAPI_DECL HAPI_SetServerEnvString ( const HAPI_Session session,
const char *  variable_name,
const char *  value 
)

Set environment variable for the server process as a string.

Note that this may affect other sessions on the same server process. The session parameter is mainly there to identify the server process, not the specific session.

For in-process sessions, this will affect the current process's environment.

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]variable_nameName of the environmnet variable.
[in]valueThe string value.
HAPI_DECL HAPI_SetTime ( const HAPI_Session session,
float  time 
)

Sets the global time of the scene. All API calls will deal with this time to cook.

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]timeTime as a float in seconds.
HAPI_DECL HAPI_SetTimelineOptions ( const HAPI_Session session,
const HAPI_TimelineOptions timeline_options 
)

Sets the global timeline options.

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]timeline_optionsThe global timeline options struct.
HAPI_DECL HAPI_SetTransformAnimCurve ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_TransformComponent  trans_comp,
const HAPI_Keyframe curve_keyframes_array,
int  keyframe_count 
)

A specialized convenience function to set the T,R,S values on an exposed node.

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]trans_compA value of HAPI_TransformComponent that identifies the particular comopnent of the transform to attach the curve to, for example HAPI_TRANSFORM_TX.
[in]curve_keyframes_arrayAn array of HAPI_Keyframe structs that describes the keys on this curve.
[in]keyframe_countThe number of keys on the curve.
HAPI_DECL HAPI_SetVertexList ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const int *  vertex_list_array,
int  start,
int  length 
)

Set array containing the vertex-point associations where the ith element in the array is the point index the ith vertex associates with.

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]asset_idThe asset id.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]vertex_list_arrayAn integer array at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::vertexCount - 1.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::vertexCount - start.
HAPI_DECL HAPI_SetVolumeInfo ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const HAPI_VolumeInfo volume_info 
)

Set the volume info of a geo on a geo input.

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]asset_idAn asset that this volume will be input into.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]volume_infoAll volume information that can be specified per volume. This includes the position, orientation, scale, data format, tuple size, and taper. The tile size is always 8x8x8.
HAPI_DECL HAPI_SetVolumeTileFloatData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const HAPI_VolumeTileInfo tile,
const float *  values_array,
int  length 
)

Set the values of a float tile: this is an 8x8x8 subsection of the volume.

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]asset_idThe asset that the volume will be input into.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]tileThe tile that the volume will be input into.
[in]values_arrayThe values of the individual voxel tiles in the volume. The length of this array should be ( 8 ^ 3 ) * tupleSize.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_SetVolumeTileIntData ( const HAPI_Session session,
HAPI_AssetId  asset_id,
HAPI_ObjectId  object_id,
HAPI_GeoId  geo_id,
const HAPI_VolumeTileInfo tile,
const int *  values_array,
int  length 
)

Set the values of an int tile: this is an 8x8x8 subsection of the volume.

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]asset_idThe asset that the volume will be input into.
[in]object_idThe object id.
[in]geo_idThe geometry id.
[in]tileThe tile that the volume will be input into.
[in]values_arrayThe values of the individual voxel tiles in the volume. The length of this array should be ( 8 ^ 3 ) * tupleSize.
[in]lengthThe length should be ( 8 ^ 3 ) * tupleSize.
HAPI_DECL HAPI_StartThriftNamedPipeServer ( HAPI_Bool  auto_close,
const char *  pipe_name,
float  timeout_ms,
HAPI_ProcessId process_id 
)

Starts a Thrift RPC server process on the local host serving clients on a Windows named pipe or a Unix domain socket and waits for it to start serving. It is safe to create an RPC session using the specified pipe or socket after this call succeeds.

Parameters
[in]auto_closeClose the server automatically when all clients disconnect from it.
[in]timeout_msTimeout in milliseconds for waiting on the server to signal that it's ready to serve. If the server fails to signal within this time interval, the call fails and the server process is terminated.
[in]pipe_nameThe name of the pipe or socket.
[out]process_idThe process id of the server, if started successfully.
HAPI_DECL HAPI_StartThriftSocketServer ( HAPI_Bool  auto_close,
int  port,
float  timeout_ms,
HAPI_ProcessId process_id 
)

Starts a Thrift RPC server process on the local host serving clients on a TCP socket and waits for it to start serving. It is safe to create an RPC session on local host using the specified port after this call succeeds.

Parameters
[in]auto_closeClose the server automatically when all clients disconnect from it.
[in]timeout_msTimeout in milliseconds for waiting on the server to signal that it's ready to serve. If the server fails to signal within this time interval, the call fails and the server process is terminated.
[in]portThe TCP socket to create on the server.
[out]process_idThe process id of the server, if started successfully.