HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Hip Files

Functions

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_MergeHIPFile (const HAPI_Session *session, const char *file_name, HAPI_Bool cook_on_load, HAPI_HIPFileId *file_id)
 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_GetHIPFileNodeCount (const HAPI_Session *session, HAPI_HIPFileId id, int *count)
 Gets the number of nodes that were created as a result of loading a .hip file. More...
 
HAPI_DECL HAPI_GetHIPFileNodeIds (const HAPI_Session *session, HAPI_HIPFileId id, HAPI_NodeId *node_ids, int length)
 Fills an array of HAPI_NodeId of nodes that were created as a result of loading the HIP file specified by the HAPI_HIPFileId. More...
 

Detailed Description

Functions for managing hip files

Function Documentation

HAPI_DECL HAPI_GetHIPFileNodeCount ( const HAPI_Session session,
HAPI_HIPFileId  id,
int count 
)

Gets the number of nodes that were created as a result of loading a .hip file.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]idThe HIP file id.
[out]countPointer to an int where the HIP file node count will be stored.
HAPI_DECL HAPI_GetHIPFileNodeIds ( const HAPI_Session session,
HAPI_HIPFileId  id,
HAPI_NodeId node_ids,
int  length 
)

Fills an array of HAPI_NodeId of nodes that were created as a result of loading the HIP file specified by the HAPI_HIPFileId.

Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]idThe HIP file id.
[out]node_idsArray of HAPI_NodeId at least the size of length.
[in]lengthThe number of HAPI_NodeId to be stored. This should be at least 0 and at most the count provided by HAPI_GetHIPFileNodeCount
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!
This method will load the HIP file into the scene. This means that any registered hou.hipFile event callbacks will be triggered with the hou.hipFileEventType.BeforeMerge and hou.hipFileEventType.AfterMerge events.
This method loads a HIP file, completely overwriting everything that already exists in the scene. Therefore, any HAPI ids (node ids, part ids, etc.) that were obtained before calling this method will be invalidated.
Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]file_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_MergeHIPFile ( const HAPI_Session session,
const char *  file_name,
HAPI_Bool  cook_on_load,
HAPI_HIPFileId file_id 
)

Loads a .hip file into the main Houdini scene.

Note
In threaded mode, this is an async call!
This method will merge the HIP file into the scene. This means that any registered hou.hipFile event callbacks will be triggered with the hou.hipFileEventType.BeforeMerge and hou.hipFileEventType.AfterMerge events.
Parameters
[in]sessionThe session of Houdini you are interacting with. See HAPI_Sessions for more on sessions. Pass NULL to just use the default in-process session.
[in]file_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.
[out]file_idThis parameter will be set to the HAPI_HIPFileId of the loaded HIP file. This can be used to lookup nodes that were created as a result of loading this HIP file.
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 HAPI_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.