Houdini Engine 3.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 (const HAPI_ThriftServerOptions *options, int port, 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 (const HAPI_ThriftServerOptions *options, const char *pipe_name, 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_NOT_INITIALIZED 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 *houdini_environment_files, 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_Cleanup (const HAPI_Session *session)
 [HAPI_Initialize] 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_ComposeNodeCookResult (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_StatusVerbosity verbosity, int *buffer_length)
 Compose the cook result string (errors and warnings) of a specific node. More...
 
HAPI_DECL HAPI_GetComposedNodeCookResult (const HAPI_Session *session, char *string_value, int length)
 Return cook result string message on a single node. More...
 
HAPI_DECL HAPI_CheckForSpecificErrors (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ErrorCodeBits errors_to_look_for, HAPI_ErrorCodeBits *errors_found)
 Recursively check for specific errors by error code on a node. 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_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 create 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 create 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_GetAssetInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_AssetInfo *asset_info)
 Fill an asset_info struct from a node. More...
 
HAPI_DECL HAPI_Interrupt (const HAPI_Session *session)
 Interrupt a cook or load operation. 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_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_IsNodeValid (const HAPI_Session *session, HAPI_NodeId node_id, int unique_node_id, HAPI_Bool *answer)
 Determine if your instance of the node 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 nodes. Note that this function will ALWAYS return HAPI_RESULT_SUCCESS. 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_GetNodePath (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_NodeId relative_to_node_id, HAPI_StringHandle *path)
 Get the node absolute path in the Houdini node network or a relative path any other node. More...
 
HAPI_DECL HAPI_GetManagerNodeId (const HAPI_Session *session, HAPI_NodeType node_type, HAPI_NodeId *node_id)
 Get the root node of a particular network type (ie. OBJ). More...
 
HAPI_DECL HAPI_ComposeChildNodeList (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_NodeTypeBits node_type_filter, HAPI_NodeFlagsBits node_flags_filter, HAPI_Bool recursive, int *count)
 Compose a list of child nodes based on given filters. More...
 
HAPI_DECL HAPI_GetComposedChildNodeList (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_NodeId *child_node_ids_array, int count)
 Get the composed list of child node ids from the previous call to HAPI_ComposeChildNodeList(). More...
 
HAPI_DECL HAPI_CreateNode (const HAPI_Session *session, HAPI_NodeId parent_node_id, const char *operator_name, const char *node_label, HAPI_Bool cook_on_creation, 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_CreateInputNode (const HAPI_Session *session, HAPI_NodeId *node_id, const char *name)
 Creates a simple geometry SOP node 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 node to any other node as a geometry input. More...
 
HAPI_DECL HAPI_CookNode (const HAPI_Session *session, HAPI_NodeId node_id, const HAPI_CookOptions *cook_options)
 Initiate a cook on this node. Note that this may trigger cooks on other nodes if they are connected. 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_GetNodeInputName (const HAPI_Session *session, HAPI_NodeId node_id, int input_idx, HAPI_StringHandle *name)
 Get the name of an node'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_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_GetParmTagName (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int tag_index, HAPI_StringHandle *tag_name)
 Get the tag name on a parameter given an index. More...
 
HAPI_DECL HAPI_GetParmTagValue (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, const char *tag_name, HAPI_StringHandle *tag_value)
 Get the tag value on a parameter given the tag name. More...
 
HAPI_DECL HAPI_ParmHasTag (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, const char *tag_name, HAPI_Bool *has_tag)
 See if a parameter has a specific tag. More...
 
HAPI_DECL HAPI_ParmHasExpression (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, HAPI_Bool *has_expression)
 See if a parameter has an expression. More...
 
HAPI_DECL HAPI_GetParmWithTag (const HAPI_Session *session, HAPI_NodeId node_id, const char *tag_name, HAPI_ParmId *parm_id)
 Get the first parm with a specific, ideally unique, tag on it. This is particularly useful for getting the ogl parameters on a material node. More...
 
HAPI_DECL HAPI_GetParmExpression (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index, HAPI_StringHandle *value)
 Get single integer or float parm expression by name or Null string if no expression is present. More...
 
HAPI_DECL HAPI_RevertParmToDefault (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, int index)
 Revert single parm by name to default. More...
 
HAPI_DECL HAPI_RevertParmToDefaults (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name)
 Revert all instances of the parm by name to defaults. More...
 
HAPI_DECL HAPI_SetParmExpression (const HAPI_Session *session, HAPI_NodeId node_id, const char *value, HAPI_ParmId parm_id, int index)
 Set (push) an expression string. We can only set a single value at a time because we want to avoid fixed size string buffers. More...
 
HAPI_DECL HAPI_RemoveParmExpression (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ParmId parm_id, int index)
 Remove the expression string, leaving the value of the parm at the current value of the expression. 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_GetParmNodeValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, HAPI_NodeId *value)
 Get a single node id parm value of an Op Path parameter. This is how you see which node is connected as an input for the current node (via parameter). More...
 
HAPI_DECL HAPI_GetParmFile (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, const char *destination_directory, const char *destination_file_name)
 Extract a file specified by path on a parameter. This will copy the file to the destination directory from wherever it might be, inlcuding inside the asset definition or online. 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_SetParmNodeValue (const HAPI_Session *session, HAPI_NodeId node_id, const char *parm_name, HAPI_NodeId value)
 Set a node id parm value of an Op Path parameter. For example, This is how you connect the geometry output of an asset to the geometry input of another asset - whether the input is a parameter or a node input (the top of the node). Node inputs get converted top parameters in HAPI. 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_NodeId node_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 node. More...
 
HAPI_DECL HAPI_GetHandleBindingInfo (const HAPI_Session *session, HAPI_NodeId node_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 node. 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_GetObjectInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_ObjectInfo *object_info)
 Get the object info on an OBJ node. More...
 
HAPI_DECL HAPI_GetObjectTransform (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_NodeId relative_to_node_id, HAPI_RSTOrder rst_order, HAPI_Transform *transform)
 Get the tranform of an OBJ node. More...
 
HAPI_DECL HAPI_ComposeObjectList (const HAPI_Session *session, HAPI_NodeId parent_node_id, const char *categories, int *object_count)
 Compose a list of child object nodes given a parent node id. More...
 
HAPI_DECL HAPI_GetComposedObjectList (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_ObjectInfo *object_infos_array, int start, int length)
 Fill an array of HAPI_ObjectInfo structs. More...
 
HAPI_DECL HAPI_GetComposedObjectTransforms (const HAPI_Session *session, HAPI_NodeId parent_node_id, HAPI_RSTOrder rst_order, HAPI_Transform *transform_array, int start, int length)
 Fill an array of HAPI_Transform structs. More...
 
HAPI_DECL HAPI_GetInstancedObjectIds (const HAPI_Session *session, HAPI_NodeId object_node_id, HAPI_NodeId *instanced_node_id_array, int start, int length)
 Get the node ids for the objects being instanced by an Instance OBJ node. More...
 
HAPI_DECL HAPI_GetInstanceTransforms (const HAPI_Session *session, HAPI_NodeId object_node_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_NodeId node_id, const HAPI_TransformEuler *trans)
 Set the transform of an individual object. Note that the object nodes have to either be editable or have their transform parameters exposed at the asset level. This won't work otherwise. More...
 
HAPI_DECL HAPI_GetDisplayGeoInfo (const HAPI_Session *session, HAPI_NodeId object_node_id, HAPI_GeoInfo *geo_info)
 Get the display geo (SOP) node inside an Object node. If there there are multiple display SOP nodes, only the first one is returned. If the node is a display SOP itself, even if a network, it will return its own geo info. If the node is a SOP but not a network and not the display SOP, this function will fail. More...
 
HAPI_DECL HAPI_GetGeoInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_GeoInfo *geo_info)
 Get the geometry info struct (HAPI_GeoInfo) on a SOP node. More...
 
HAPI_DECL HAPI_GetPartInfo (const HAPI_Session *session, HAPI_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int stride, int *data_array, int start, int length)
 Get attribute integer data. More...
 
HAPI_DECL HAPI_GetAttributeInt64Data (const HAPI_Session *session, HAPI_NodeId node_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_NodeId node_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, int stride, float *data_array, int start, int length)
 Get attribute float data. More...
 
HAPI_DECL HAPI_GetAttributeFloat64Data (const HAPI_Session *session, HAPI_NodeId node_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_NodeId node_id, HAPI_PartId part_id, const char *name, HAPI_AttributeInfo *attr_info, HAPI_StringHandle *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_NodeId node_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_NodeId node_id, HAPI_PartId part_id, HAPI_GroupType group_type, const char *group_name, HAPI_Bool *membership_array_all_equal, int *membership_array, int start, int length)
 Get group membership. More...
 
HAPI_DECL HAPI_GetInstancedPartIds (const HAPI_Session *session, HAPI_NodeId node_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_NodeId node_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_SetPartInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const HAPI_PartInfo *part_info)
 Set the main part info struct (HAPI_PartInfo). More...
 
HAPI_DECL HAPI_SetFaceCounts (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_id, const char *name, const HAPI_AttributeInfo *attr_info)
 Add an attribute. More...
 
HAPI_DECL HAPI_SetAttributeIntData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_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_NodeId node_id)
 Remove all changes that have been committed to this geometry. If this is an intermediate result node (Edit SOP), all deltas will be removed. If it's any other type of node, the node will be unlocked if it is locked. More...
 
HAPI_DECL HAPI_GetMaterialNodeIdsOnFaces (const HAPI_Session *session, HAPI_NodeId geometry_node_id, HAPI_PartId part_id, HAPI_Bool *are_all_the_same, HAPI_NodeId *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_NodeId material_node_id, HAPI_MaterialInfo *material_info)
 Get the material info. More...
 
HAPI_DECL HAPI_RenderCOPToImage (const HAPI_Session *session, HAPI_NodeId cop_node_id)
 Render a single texture from a COP to an image for later extraction. More...
 
HAPI_DECL HAPI_RenderTextureToImage (const HAPI_Session *session, HAPI_NodeId material_node_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_GetImageInfo (const HAPI_Session *session, HAPI_NodeId material_node_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_NodeId material_node_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_NodeId material_node_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_NodeId material_node_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_NodeId material_node_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_NodeId material_node_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_NodeId material_node_id, char *buffer, int length)
 Fill your allocated buffer with the just extracted image buffer. 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_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_GetHeightFieldData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, float *values_array, int start, int length)
 Get the height field data for a terrain volume as a flattened 2D array of float heights. Should call HAPI_GetVolumeInfo() first to make sure the volume info is initialized. More...
 
HAPI_DECL HAPI_SetVolumeInfo (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_NodeId node_id, HAPI_PartId part_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_SetVolumeVoxelFloatData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, const float *values_array, int value_count)
 Set the values of a float voxel in the volume. More...
 
HAPI_DECL HAPI_SetVolumeVoxelIntData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, int x_index, int y_index, int z_index, const int *values_array, int value_count)
 Set the values of a integer voxel in the volume. More...
 
HAPI_DECL HAPI_GetVolumeBounds (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, float *x_min, float *y_min, float *z_min, float *x_max, float *y_max, float *z_max, float *x_center, float *y_center, float *z_center)
 Get the bounding values of a volume. More...
 
HAPI_DECL HAPI_SetHeightFieldData (const HAPI_Session *session, HAPI_NodeId node_id, HAPI_PartId part_id, const char *name, const float *values_array, int start, int length)
 Set the height field data for a terrain volume with the values from a flattened 2D array of float. HAPI_SetVolumeInfo() should be called first to make sure that the volume and its info are initialized. More...
 
HAPI_DECL HAPI_GetCurveInfo (const HAPI_Session *session, HAPI_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_NodeId node_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_GetBoxInfo (const HAPI_Session *session, HAPI_NodeId geo_node_id, HAPI_PartId part_id, HAPI_BoxInfo *box_info)
 Get the box info on a geo part (if the part is a box). More...
 
HAPI_DECL HAPI_GetSphereInfo (const HAPI_Session *session, HAPI_NodeId geo_node_id, HAPI_PartId part_id, HAPI_SphereInfo *sphere_info)
 Get the sphere info on a geo part (if the part is a sphere). 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_NodeId node_id, const char *file_name)
 Saves a geometry to file. The type of file to save is to be determined by the extension ie. .bgeo, .obj. More...
 
HAPI_DECL HAPI_LoadGeoFromFile (const HAPI_Session *session, HAPI_NodeId node_id, const char *file_name)
 Loads a geometry file and put its contents onto a SOP node. More...
 
HAPI_DECL HAPI_GetGeoSize (const HAPI_Session *session, HAPI_NodeId node_id, const char *format, int *size)
 Cache the current state of the geo to memory, given the format, and return the size. Use this size with your call to HAPI_SaveGeoToMemory() to copy the cached geo to your buffer. It is guaranteed that the size will not change between your call to HAPI_GetGeoSize() and HAPI_SaveGeoToMemory(). More...
 
HAPI_DECL HAPI_SaveGeoToMemory (const HAPI_Session *session, HAPI_NodeId node_id, char *buffer, int length)
 Saves the cached geometry to your buffer in memory, whose format and required size is identified by the call to HAPI_GetGeoSize(). The call to HAPI_GetGeoSize() is required as HAPI_GetGeoSize() does the actual saving work. More...
 
HAPI_DECL HAPI_LoadGeoFromMemory (const HAPI_Session *session, HAPI_NodeId node_id, const char *format, const char *buffer, int length)
 Loads a geometry from memory and put its contents onto a SOP node. More...
 

Function Documentation

HAPI_DECL HAPI_AddAttribute ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[in]nameAttribute name.
[in]attr_infoHAPI_AttributeInfo stores attribute properties.
HAPI_DECL HAPI_AddGroup ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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_CheckForSpecificErrors ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ErrorCodeBits  errors_to_look_for,
HAPI_ErrorCodeBits errors_found 
)

Recursively check for specific errors by error code on a node.

Note that checking for errors can be expensive because it checks ALL child nodes within a node and then tries to do a string match for the errors being looked for. This is why such error checking is part of a standalone function and not done during the cooking step.

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]errors_to_look_forThe HAPI_ErrorCode error codes (as a bitfield) to look for.
[out]errors_foundReturned HAPI_ErrorCode bitfield indicating which of the looked for errors have been found.
HAPI_DECL HAPI_Cleanup ( const HAPI_Session session)

[HAPI_Initialize]

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_NodeId  node_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]node_idThe SOP node id.
HAPI_DECL HAPI_ComposeChildNodeList ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_NodeTypeBits  node_type_filter,
HAPI_NodeFlagsBits  node_flags_filter,
HAPI_Bool  recursive,
int *  count 
)

Compose a list of child nodes based on given filters.

This function will only compose the list of child nodes. It will not return this list. After your call to this function, call HAPI_GetComposedChildNodeList() to get the list of child node ids.

Note: When looking for all Display SOP nodes using this function, and using recursive mode, the recursion will stop as soon as a display SOP is found within each OBJ geometry network. It is almost never useful to get a list of ALL display SOP nodes recursively as they would all containt the same geometry. Even so, this special case only comes up if the display SOP itself is a subnet.

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 node id of the parent node.
[in]node_type_filterThe node type by which to filter the children.
[in]node_flags_filterThe node flags by which to filter the children.
[in]recursiveWhether or not to compose the list recursively.
[out]countThe number of child nodes composed. Use this as the argument to HAPI_GetComposedChildNodeList().
HAPI_DECL HAPI_ComposeNodeCookResult ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_StatusVerbosity  verbosity,
int *  buffer_length 
)

Compose the cook result string (errors and warnings) of a specific node.

This will actually parse the node network inside the given node and return ALL errors/warnings/messages of all child nodes, combined into a single string. If you'd like a more narrowed search, call this function on one of the child nodes.

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

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]verbosityPreferred verbosity level.
[out]buffer_lengthLength of buffer char array ready to be filled.
HAPI_DECL HAPI_ComposeObjectList ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
const char *  categories,
int *  object_count 
)

Compose a list of child object nodes given a parent node id.

Use the object_count returned by this function to get the HAPI_ObjectInfo structs for each child object using HAPI_GetComposedObjectList().

Note, if not using the categories arg, this is equivalent to:

session, parent_node_id,
true, &object_count );
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 id.
[in]categories(Optional) Lets you filter object nodes by their render categories. This is a standard OBJ parameter, usually under the Render > Shading tab. If an OBJ node does not have this parameter, one can always add it as a spare.

The value of this string argument should be NULL if not used or a space-separated list of category names. Multiple category names will be treated as an AND op.

Parameters
[out]object_countThe number of object nodes currently under the parent. Use this count with a call to HAPI_GetComposedObjectList() to get the object infos.
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_CookNode ( const HAPI_Session session,
HAPI_NodeId  node_id,
const HAPI_CookOptions cook_options 
)

Initiate a cook on this node. Note that this may trigger cooks on other nodes 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 immediately. 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]cook_optionsThe cook options. Pass in NULL to use the global cook options that you specified when calling HAPI_Initialize().
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_CreateInputNode ( const HAPI_Session session,
HAPI_NodeId node_id,
const char *  name 
)

Creates a simple geometry SOP node 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 node to any other node as a geometry input.

Note that when saving the Houdini scene using HAPI_SaveHIPFile() the 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]node_idNewly created node's id. Use HAPI_GetNodeInfo() to get more information about the node.
[in]nameGive this input node a name for easy debugging. The node's parent 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,
const char *  node_label,
HAPI_Bool  cook_on_creation,
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.

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 immediately 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 creation (and, optionally, the first cook) of the node 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]parent_node_idThe parent node network's node id or -1 if the parent network is the manager (top-level) node. In that case, the manager must be identified by the table name in the operator_name.
[in]operator_nameThe name of the node operator type.

If you passed parent_node_id == -1, then the operator_name has to include the table name (ie. Object/ or Sop/). This is the common case for when creating asset nodes from a loaded asset library. In that case, just pass whatever HAPI_GetAvailableAssets() returns.

If you have a parent_node_id then you should include only the namespace, name, and version.

For example, lets say you have an Object type asset, in the "hapi" namespace, of version 2.0, named "foo". If you pass parent_node_id == -1, then set the operator_name as "Object/hapi::foo::2.0". Otherwise, if you have a valid parent_node_id, then just pass operator_name as "hapi::foo::2.0".

Parameters
[in]node_label(Optional) The label of the newly created node.
[in]cook_on_creationSet whether the node should cook once created or not.
[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 unique session id of the new session.
[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 unique session id of the new session.
[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_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_NodeId  material_node_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]material_node_idThe material node id.
[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_NodeId  material_node_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 compositing 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]material_node_idThe material node id.
[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_NodeId  node_id,
HAPI_AssetInfo asset_info 
)

Fill an asset_info struct from a 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]asset_infoReturned HAPI_AssetInfo struct.
HAPI_DECL HAPI_GetAttributeFloat64Data ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe node 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 * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
int  stride,
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]node_idThe node 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 float array at least the size of length * HAPI_AttributeInfo::tupleSize.
[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_GetAttributeInfo ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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 * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
int  stride,
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]node_idThe node 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 integer array at least the size of length * HAPI_AttributeInfo::tupleSize.
[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_GetAttributeNames ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe node 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_NodeId  node_id,
HAPI_PartId  part_id,
const char *  name,
HAPI_AttributeInfo attr_info,
HAPI_StringHandle 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]node_idThe node 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 HAPI_StringHandle array at least the size of length * HAPI_AttributeInfo::tupleSize.
[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_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_CreateNode() to create the node. 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_GetBoxInfo ( const HAPI_Session session,
HAPI_NodeId  geo_node_id,
HAPI_PartId  part_id,
HAPI_BoxInfo box_info 
)

Get the box info on a geo part (if the part is a box).

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]geo_node_idThe geo node id.
[in]part_idThe part id of the
[out]box_infoThe returned box info.
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_GetComposedChildNodeList ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_NodeId child_node_ids_array,
int  count 
)

Get the composed list of child node ids from the previous call to HAPI_ComposeChildNodeList().

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 node id of the parent node.
[out]child_node_ids_arrayThe array of HAPI_NodeId for the child nodes.
[in]countThe number of children in the composed list. MUST match the count returned by HAPI_ComposeChildNodeList().
HAPI_DECL HAPI_GetComposedNodeCookResult ( const HAPI_Session session,
char *  string_value,
int  length 
)

Return cook result string message on a single node.

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

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]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_GetComposedObjectList ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_ObjectInfo object_infos_array,
int  start,
int  length 
)

Fill an array of HAPI_ObjectInfo structs.

This is best used with HAPI_ComposeObjectList() 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]parent_node_idThe parent node id.
[out]object_infos_arrayArray of HAPI_ObjectInfo at least the size of length.
[in]startAt least 0 and at most object_count returned by HAPI_ComposeObjectList().
[in]lengthGiven object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start.
HAPI_DECL HAPI_GetComposedObjectTransforms ( const HAPI_Session session,
HAPI_NodeId  parent_node_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transform_array,
int  start,
int  length 
)

Fill an array of HAPI_Transform structs.

This is best used with HAPI_ComposeObjectList() with.

Note that these transforms will be relative to the parent_node_id originally given to HAPI_ComposeObjectList() and expected to be the same with this call. If parent_node_id is not an OBJ node, the transforms will be given as they are on the object node itself.

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 id. The object transforms will be relative to this node unless this node is not an OBJ.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transform_arrayArray of HAPI_Transform at least the size of length.
[in]startAt least 0 and at most object_count returned by HAPI_ComposeObjectList().
[in]lengthGiven object_count returned by HAPI_ComposeObjectList(), length should be at least 0 and at most object_count - start.
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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_GetDisplayGeoInfo ( const HAPI_Session session,
HAPI_NodeId  object_node_id,
HAPI_GeoInfo geo_info 
)

Get the display geo (SOP) node inside an Object node. If there there are multiple display SOP nodes, only the first one is returned. If the node is a display SOP itself, even if a network, it will return its own geo info. If the node is a SOP but not a network and not the display SOP, this function will fail.

The above implies that you can safely call this function on both OBJ and SOP asset nodes and get the same (equivalent) geometry display node back. SOP asset nodes will simply return themselves.

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]object_node_idThe object node id.
[out]geo_infoHAPI_GeoInfo return value.
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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_id,
HAPI_GeoInfo geo_info 
)

Get the geometry info struct (HAPI_GeoInfo) on 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]node_idThe node id.
[out]geo_infoHAPI_GeoInfo return value.
HAPI_DECL HAPI_GetGeoSize ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  format,
int *  size 
)

Cache the current state of the geo to memory, given the format, and return the size. Use this size with your call to HAPI_SaveGeoToMemory() to copy the cached geo to your buffer. It is guaranteed that the size will not change between your call to HAPI_GetGeoSize() and HAPI_SaveGeoToMemory().

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]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_NodeId  node_id,
HAPI_PartId  part_id,
HAPI_GroupType  group_type,
const char *  group_name,
HAPI_Bool membership_array_all_equal,
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]node_idThe node id.
[in]part_idThe part id.
[in]group_typeThe group type.
[in]group_nameThe group name.
[out]membership_array_all_equal(optional) Quick way to determine if all items are in the given group or all items our not in the group. You can just pass NULL here if not interested.
[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_NodeId  node_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]node_idThe node 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_NodeId  node_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 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.
[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_NodeId  node_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 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]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_GetHeightFieldData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
float *  values_array,
int  start,
int  length 
)

Get the height field data for a terrain volume as a flattened 2D array of float heights. Should call HAPI_GetVolumeInfo() first to make sure the volume info is initialized.

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]part_idThe part id.
[out]values_arrayHeightfield flattened array. Should be at least the size of start + length.
[in]startThe start at least 0 and at most ( HAPI_VolumeInfo.xLength * HAPI_VolumeInfo::yLength )
  • length.
[in]lengthThe length should be at least 1 or at most ( HAPI_VolumeInfo.xLength * HAPI_VolumeInfo::yLength )
  • start.
HAPI_DECL HAPI_GetImageInfo ( const HAPI_Session session,
HAPI_NodeId  material_node_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]material_node_idThe material node id.
[out]image_infoThe struct containing the image information.
HAPI_DECL HAPI_GetImageMemoryBuffer ( const HAPI_Session session,
HAPI_NodeId  material_node_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]material_node_idThe material node id.
[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_NodeId  material_node_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]material_node_idThe material node id.
[out]image_plane_countThe number of image planes.
HAPI_DECL HAPI_GetImagePlanes ( const HAPI_Session session,
HAPI_NodeId  material_node_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]material_node_idThe material node id.
[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_GetInstancedObjectIds ( const HAPI_Session session,
HAPI_NodeId  object_node_id,
HAPI_NodeId instanced_node_id_array,
int  start,
int  length 
)

Get the node ids for the objects being instanced by an Instance OBJ 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]object_node_idThe object node id.
[out]instanced_node_id_arrayArray of HAPI_NodeId at least the size of length.
[in]startFirst index of range. Must be at least 0 and at most HAPI_PartInfo::pointCount - 1. This is the 0th part of the display geo of the instancer object node.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::pointCount - start. This is the 0th part of the display geo of the instancer object node.
HAPI_DECL HAPI_GetInstancedPartIds ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  object_node_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]object_node_idThe object node 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. This is the 0th part of the display geo of the instancer object node.
[in]lengthMust be at least 0 and at most HAPI_PartInfo::pointCount - start. This is the 0th part of the display geo of the instancer object node.
HAPI_DECL HAPI_GetManagerNodeId ( const HAPI_Session session,
HAPI_NodeType  node_type,
HAPI_NodeId node_id 
)

Get the root node of a particular network type (ie. 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]node_typeThe node network type.
[out]node_idThe node id of the root node network.
HAPI_DECL HAPI_GetMaterialInfo ( const HAPI_Session session,
HAPI_NodeId  material_node_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]material_node_idThe material node id.
[out]material_infoThe returned material info.
HAPI_DECL HAPI_GetMaterialNodeIdsOnFaces ( const HAPI_Session session,
HAPI_NodeId  geometry_node_id,
HAPI_PartId  part_id,
HAPI_Bool are_all_the_same,
HAPI_NodeId 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]geometry_node_idThe geometry node 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_NodeId 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_GetNextVolumeTile ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe node 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_GetNodeInputName ( const HAPI_Session session,
HAPI_NodeId  node_id,
int  input_idx,
HAPI_StringHandle name 
)

Get the name of an node'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]node_idThe node id.
[in]input_idxInput index of the asset.
[out]nameInput name string handle return value - valid until the next call to this function.
HAPI_DECL HAPI_GetNodePath ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_NodeId  relative_to_node_id,
HAPI_StringHandle path 
)

Get the node absolute path in the Houdini node network or a relative path any other 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.
[in]relative_to_node_idSet this to -1 to get the absolute path of the node_id. Otherwise, the path will be relative to this node id.
[out]pathThe returned path string, valid until the next call to this function.
HAPI_DECL HAPI_GetObjectInfo ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ObjectInfo object_info 
)

Get the object info on an OBJ 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]object_infoThe output HAPI_ObjectInfo.
HAPI_DECL HAPI_GetObjectTransform ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_NodeId  relative_to_node_id,
HAPI_RSTOrder  rst_order,
HAPI_Transform transform 
)

Get the tranform of an OBJ 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 object node id.
[in]relative_to_node_idThe object node id for the object to which the returned transform will be relative to. Pass -1 or the node_id to just get the object's local transform.
[in]rst_orderThe order of application of translation, rotation and scale.
[out]transformThe output HAPI_Transform transform.
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_GetParmExpression ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
HAPI_StringHandle value 
)

Get single integer or float parm expression by name or Null string if no expression is present.

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 string value.
HAPI_DECL HAPI_GetParmFile ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
const char *  destination_directory,
const char *  destination_file_name 
)

Extract a file specified by path on a parameter. This will copy the file to the destination directory from wherever it might be, inlcuding inside the asset definition or online.

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]destination_directoryThe destination directory to copy the file to.
[in]destination_file_nameThe destination file name.
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_GetParmNodeValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
HAPI_NodeId value 
)

Get a single node id parm value of an Op Path parameter. This is how you see which node is connected as an input for the current node (via parameter).

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.
[out]valueThe node id of the node being pointed to by the parm. If there is no node found, -1 will be returned.
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 integers 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_GetParmTagName ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
int  tag_index,
HAPI_StringHandle tag_name 
)

Get the tag name on a parameter given an index.

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.
[in]tag_indexThe tag index, which should be between 0 and HAPI_ParmInfo::tagCount - 1.
[out]tag_nameThe returned tag name. This string handle will be valid until another call to HAPI_GetParmTagName().
HAPI_DECL HAPI_GetParmTagValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
const char *  tag_name,
HAPI_StringHandle tag_value 
)

Get the tag value on a parameter given the tag 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_idThe parm id.
[in]tag_nameThe tag name, either known or returned by HAPI_GetParmTagName().
[out]tag_valueThe returned tag value. This string handle will be valid until another call to HAPI_GetParmTagValue().
HAPI_DECL HAPI_GetParmWithTag ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  tag_name,
HAPI_ParmId parm_id 
)

Get the first parm with a specific, ideally unique, tag on it. This is particularly useful for getting the ogl parameters on a material 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.
[in]tag_nameThe tag name to look for.
[out]parm_idThe returned parm id. This will be -1 if no parm was found with this tag.
HAPI_DECL HAPI_GetPartInfo ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe SOP node 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_GetSphereInfo ( const HAPI_Session session,
HAPI_NodeId  geo_node_id,
HAPI_PartId  part_id,
HAPI_SphereInfo sphere_info 
)

Get the sphere info on a geo part (if the part is a sphere).

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]geo_node_idThe geo node id.
[in]part_idThe part id of the
[out]sphere_infoThe returned sphere info.
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 multiple "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_NodeId  node_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]node_idThe node 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_GetVolumeBounds ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
float *  x_min,
float *  y_min,
float *  z_min,
float *  x_max,
float *  y_max,
float *  z_max,
float *  x_center,
float *  y_center,
float *  z_center 
)

Get the bounding values of a 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]node_idThe node id.
[in]part_idThe part id.
[out]x_minThe minimum x value of the volume's bounding box. Can be null if you do not want this value.
[out]y_minThe minimum y value of the volume's bounding box. Can be null if you do not want this value.
[out]z_minThe minimum z value of the volume's bounding box. Can be null if you do not want this value.
[out]x_maxThe maximum x value of the volume's bounding box. Can be null if you do not want this value.
[out]y_maxThe maximum y value of the volume's bounding box. Can be null if you do not want this value.
[out]z_maxThe maximum z value of the volume's bounding box. Can be null if you do not want this value.
[out]x_centerThe x value of the volume's bounding box center. Can be null if you do not want this value.
[out]y_centerThe y value of the volume's bounding box center. Can be null if you do not want this value.
[out]z_centerThe z value of the volume's bounding box center. Can be null if you do not want this value.
HAPI_DECL HAPI_GetVolumeInfo ( const HAPI_Session session,
HAPI_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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 *  houdini_environment_files,
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]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
[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_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_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_NOT_INITIALIZED 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_IsNodeValid ( const HAPI_Session session,
HAPI_NodeId  node_id,
int  unique_node_id,
HAPI_Bool answer 
)

Determine if your instance of the node 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 nodes. 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]node_idThe node id.
[in]unique_node_idThe unique node id from HAPI_NodeInfo::uniqueHoudiniNodeId.
[out]answerAnswer to the question.
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 create 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_CreateNode() to actually create one of these nodes 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 definitions that have already been loaded they will overwrite the existing definitions. Otherwise, a library containing asset definitions 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 create 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_CreateNode() to actually create one of these nodes 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 definitions that have already been loaded they will overwrite the existing definitions. Otherwise, a library containing asset definitions 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_NodeId  node_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]node_idThe node id.
[in]file_nameThe name of the file to be loaded
HAPI_DECL HAPI_LoadGeoFromMemory ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  format,
const char *  buffer,
int  length 
)

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

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]formatThe file format, ie. "obj", "bgeo" etc.
[in]bufferThe buffer we will read the geometry 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 nodes to cook as soon as they are created. Otherwise, you will have to call HAPI_CookNode() explicitly for each after you call this function.
HAPI_DECL HAPI_ParmHasExpression ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index,
HAPI_Bool has_expression 
)

See if a parameter has an expression.

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]indexThe parm index.
[out]has_expressionTrue if an expression exists on the parameter, false otherwise.
HAPI_DECL HAPI_ParmHasTag ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
const char *  tag_name,
HAPI_Bool has_tag 
)

See if a parameter has a specific tag.

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.
[in]tag_nameThe tag name to look for.
[out]has_tagTrue if the tag exists on the parameter, false otherwise.
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_CreateNode() 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_RemoveParmExpression ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_ParmId  parm_id,
int  index 
)

Remove the expression string, leaving the value of the parm at the current value of the expression.

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 immediately. 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_idParameter id of the parameter being updated.
[in]indexIndex within the parameter's values tuple.
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_RenderCOPToImage ( const HAPI_Session session,
HAPI_NodeId  cop_node_id 
)

Render a single texture from a COP to an image for later extraction.

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]cop_node_idThe COP node id.
HAPI_DECL HAPI_RenderTextureToImage ( const HAPI_Session session,
HAPI_NodeId  material_node_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]material_node_idThe material node id.
[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_NodeId  node_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]node_idThe asset node id.
HAPI_DECL HAPI_RevertGeo ( const HAPI_Session session,
HAPI_NodeId  node_id 
)

Remove all changes that have been committed to this geometry. If this is an intermediate result node (Edit SOP), all deltas will be removed. If it's any other type of node, the node will be unlocked if it is locked.

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 SOP node id.
HAPI_DECL HAPI_RevertParmToDefault ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
int  index 
)

Revert single parm by name to default.

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.
HAPI_DECL HAPI_RevertParmToDefaults ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name 
)

Revert all instances of the parm by name to defaults.

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.
HAPI_DECL HAPI_SaveGeoToFile ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  file_name 
)

Saves a geometry to file. The type of file to save is to be determined by the extension ie. .bgeo, .obj.

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]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_NodeId  node_id,
char *  buffer,
int  length 
)

Saves the cached geometry to your buffer in memory, whose format and required size is identified by the call to HAPI_GetGeoSize(). The call to HAPI_GetGeoSize() is required as HAPI_GetGeoSize() does the actual saving work.

Also note that this call to HAPI_SaveGeoToMemory will delete the internal geo buffer that was cached in the previous call to HAPI_GetGeoSize(). This means that you will need to call HAPI_GetGeoSize() again before you can call this function.

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]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_SetAttributeFloat64Data ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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 64-bit float array at least the size of length * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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 * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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 64-bit integer array at least the size of length * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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 * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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 HAPI_StringHandle array at least the size of length * HAPI_AttributeInfo::tupleSize.
[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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_NodeId  node_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]node_idThe node 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_SetFaceCounts ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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_SetGroupMembership ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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_SetHeightFieldData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
const char *  name,
const float *  values_array,
int  start,
int  length 
)

Set the height field data for a terrain volume with the values from a flattened 2D array of float. HAPI_SetVolumeInfo() should be called first to make sure that the volume and its info are initialized.

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]part_idThe part id.
[in]values_arrayHeightfield flattened array. Should be at least the size of start + length.
[in]startThe start at least 0 and at most ( HAPI_VolumeInfo.xLength * HAPI_VolumeInfo::yLength )
  • length.
[in]lengthThe length should be at least 1 or at most ( HAPI_VolumeInfo.xLength * HAPI_VolumeInfo::yLength )
  • start.
[in]nameThe name of the volume used for the heightfield. If set to "height" the values will be used for height information, if not, the data will used as a mask.
HAPI_DECL HAPI_SetImageInfo ( const HAPI_Session session,
HAPI_NodeId  material_node_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]material_node_idThe material node id.
[in]image_infoThe struct containing the new image information.
HAPI_DECL HAPI_SetObjectTransform ( const HAPI_Session session,
HAPI_NodeId  node_id,
const HAPI_TransformEuler trans 
)

Set the transform of an individual object. Note that the object nodes have to either be editable or have their transform parameters exposed at the asset level. This won't work 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.
[in]node_idThe object node id.
[in]transA HAPI_TransformEuler that stores the transform.
HAPI_DECL HAPI_SetParmExpression ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  value,
HAPI_ParmId  parm_id,
int  index 
)

Set (push) an expression string. 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 immediately. 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 expression string.
[in]parm_idParameter id of the parameter being updated.
[in]indexIndex within the parameter's values tuple.
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 immediately. 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 immediately. 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 immediately. 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 immediately. 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 integers 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_SetParmNodeValue ( const HAPI_Session session,
HAPI_NodeId  node_id,
const char *  parm_name,
HAPI_NodeId  value 
)

Set a node id parm value of an Op Path parameter. For example, This is how you connect the geometry output of an asset to the geometry input of another asset - whether the input is a parameter or a node input (the top of the node). Node inputs get converted top parameters in HAPI.

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]valueThe node id of the node being connected. Pass -1 to disconnect.
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 immediately. 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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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 component 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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe SOP node id.
[in]part_idCurrently not used. Just pass 0.
[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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe node id.
[in]part_idThe part 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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe node id.
[in]part_idThe part 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_NodeId  node_id,
HAPI_PartId  part_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]node_idThe node id.
[in]part_idThe part 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_SetVolumeVoxelFloatData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
const float *  values_array,
int  value_count 
)

Set the values of a float voxel in 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]node_idThe node 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.
[in]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_SetVolumeVoxelIntData ( const HAPI_Session session,
HAPI_NodeId  node_id,
HAPI_PartId  part_id,
int  x_index,
int  y_index,
int  z_index,
const int *  values_array,
int  value_count 
)

Set the values of a integer voxel in 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]node_idThe node 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.
[in]values_arrayThe values of the voxel.
[in]value_countShould be equal to the volume's HAPI_VolumeInfo::tupleSize.
HAPI_DECL HAPI_StartThriftNamedPipeServer ( const HAPI_ThriftServerOptions options,
const char *  pipe_name,
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]optionsOptions to configure the server being started.
[in]pipe_nameThe name of the pipe or socket.
[out]process_idThe process id of the server, if started successfully.
HAPI_DECL HAPI_StartThriftSocketServer ( const HAPI_ThriftServerOptions options,
int  port,
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]optionsOptions to configure the server being started.
[in]portThe TCP socket to create on the server.
[out]process_idThe process id of the server, if started successfully.