What's New in HAPI 7.0
Sessions
- (Added) HAPI_SessionInfo
- (Modified) HAPI_CreateThriftNamedPipeSession(): added required HAPI_SessionInfo argument
- (Modified) HAPI_CreateThriftSocketSession(): added required HAPI_SessionInfo argument
- (Added) HAPI_StartThriftSharedMemoryServer()
- (Added) HAPI_CreateThriftSharedMemorySession()
- (Added) HAPI_ThriftServerOptions::sharedMemoryBufferType
- (Added) HAPI_ThriftServerOptions::sharedMemoryBufferSize
Asset Inputs
- (Modified) HAPI_CreateInputNode(): added new "parent_node_id" required argument. This argument can optionally (-1 for default behaviour) be used to choose the OBJ node or SOP subnetwork node where the input node is created.
- (Modified) HAPI_CreateInputCurveNode(): added new "parent_node_id" required argument. This argument can optionally (-1 for default behaviour) be used to choose the OBJ node or SOP subnetwork node where the input node is created.
Assets
- (Added) HAPI_GetMessageNodeCount()
- (Added) HAPI_GetMessageNodeIds()
- (Added) HAPI_GetPresetCount()
- (Added) HAPI_GetPresetNames()
Asynchronous Attribute API
- (Added) HAPI_GetJobStatus()
- (Added) HAPI_GetAttributeIntDataAsync()
- (Added) HAPI_GetAttributeUInt8DataAsync()
- (Added) HAPI_GetAttributeInt8DataAsync()
- (Added) HAPI_GetAttributeInt16DataAsync()
- (Added) HAPI_GetAttributeInt64DataAsync()
- (Added) HAPI_GetAttributeFloatDataAsync()
- (Added) HAPI_GetAttributeFloat64DataAsync()
- (Added) HAPI_GetAttributeStringDataAsync()
- (Added) HAPI_GetAttributeDictionaryDataAsync()
- (Added) HAPI_GetAttributeIntArrayDataAsync()
- (Added) HAPI_GetAttributeUInt8ArrayDataAsync()
- (Added) HAPI_GetAttributeInt8ArrayDataAsync()
- (Added) HAPI_GetAttributeInt16ArrayDataAsync()
- (Added) HAPI_GetAttributeInt64ArrayDataAsync()
- (Added) HAPI_GetAttributeFloatArrayDataAsync()
- (Added) HAPI_GetAttributeFloat64ArrayDataAsync()
- (Added) HAPI_GetAttributeStringArrayDataAsync()
- (Added) HAPI_GetAttributeDictionaryArrayDataAsync()
- (Added) HAPI_SetAttributeIntDataAsync()
- (Added) HAPI_SetAttributeUInt8DataAsync()
- (Added) HAPI_SetAttributeInt8DataAsync()
- (Added) HAPI_SetAttributeInt16DataAsync()
- (Added) HAPI_SetAttributeInt64DataAsync()
- (Added) HAPI_SetAttributeFloatDataAsync()
- (Added) HAPI_SetAttributeFloat64DataAsync()
- (Added) HAPI_SetAttributeStringDataAsync()
- (Added) HAPI_SetAttributeIndexedStringDataAsync()
- (Added) HAPI_SetAttributeStringUniqueDataAsync()
- (Added) HAPI_SetAttributeIntUniqueDataAsync()
- (Added) HAPI_SetAttributeUInt8UniqueDataAsync()
- (Added) HAPI_SetAttributeInt8UniqueDataAsync()
- (Added) HAPI_SetAttributeInt16UniqueDataAsync()
- (Added) HAPI_SetAttributeInt64UniqueDataAsync()
- (Added) HAPI_SetAttributeFloatUniqueDataAsync()
- (Added) HAPI_SetAttributeFloat64UniqueDataAsync()
- (Added) HAPI_SetAttributeDictionaryDataAsync()
- (Added) HAPI_SetAttributeIntArrayDataAsync()
- (Added) HAPI_SetAttributeUInt8ArrayDataAsync()
- (Added) HAPI_SetAttributeInt8ArrayDataAsync()
- (Added) HAPI_SetAttributeInt16ArrayDataAsync()
- (Added) HAPI_SetAttributeInt64ArrayDataAsync()
- (Added) HAPI_SetAttributeFloatArrayDataAsync()
- (Added) HAPI_SetAttributeFloat64ArrayDataAsync()
- (Added) HAPI_SetAttributeStringArrayDataAsync()
- (Added) HAPI_SetAttributeDictionaryArrayDataAsync()
Cooking
- (Added) HAPI_GetNodeCookResultLength()
- (Added) HAPI_GetNodeCookResult()
Performance Monitor
- (Added) HAPI_StartPerformanceMonitorProfile()
- (Added) HAPI_StopPerformanceMonitorProfile()
What's New in HAPI 6.0
Support for Dictionary Attribute Types:
- (Added) HAPI_SetAttributeDictionaryData()
- (Added) HAPI_SetAttributeDictionaryArrayData()
- (Added) HAPI_GetAttributeDictionaryData()
- (Added) HAPI_GetAttributeDictionaryArrayData()
What's New in HAPI 5.0
PDG Graph Contexts Count:
- (Added) HAPI_GetPDGGraphContextsCount() returns the total number of PDG graph contexts found.
- (Modified) HAPI_GetPDGGraphContexts(): this method now requires "start" and "length" parameters to determine the range of context names and ids to return.
- (Added) HAPI_CookOptions::preferOutputNodes: if this is set to true, cooking an OBJ node will cook the output nodes of any nested SOP nodes. If none are found or the option is set to false, HAPI will instead cook the display nodes of any nested SOP nodes.
What's New in HAPI 4.2
Versioning Conventions:
Starting with Houdini 19.0, Houdini Engine will be following new conventions for updating the version numbers that are specified in HAPI_Version.h. The main goal of these new conventions is to be able to easily identify whether a Houdini Engine plugin is compatible with a particular Houdini build. For example, you may want to use a newer build of a Houdini Engine plugin without having to upgrade the full Houdini installation across your entire studio. There are three components that comprise the Houdini Engine version:
- HAPI_VERSION_HOUDINI_ENGINE_MAJOR
- HAPI_VERSION_HOUDINI_ENGINE_MINOR
- HAPI_VERSION_HOUDINI_ENGINE_API
HAPI_VERSION_HOUDINI_ENGINE_MAJOR specifies the major version of Houdini Engine and will now be bumped for every major release of Houdini to indicate that there may be fundamental differences or API backwards compatibility breaking changes between Houdini Engine releases. For a Houdini Engine plugin to be compatible with a Houdini installation, the major version must match.
HAPI_VERSION_HOUDINI_ENGINE_MINOR specifies the minor version of Houdini Engine. This number will be bumped whenever a change is made that breaks ABI compatibility and for changes that could result in a serious bug if the Houdini Engine plugin is not recompiled. For a Houdini Engine plugin to be compatible with a Houdini installation, the minor version must match.
HAPI_VERSION_HOUDINI_ENGINE_API specifies the current patch number of Houdini Engine. This number is reset to 0 whenever the HAPI_VERSION_HOUDINI_ENGINE_MINOR version is bumped. The patch number is bumped any time that a change is made within the Houdini Engine libraries. For example, this number would be bumped when adding a new method to HAPI. A Houdini Engine plugin is compatible with Houdini versions that have the same or a higher HAPI_VERSION_HOUDINI_ENGINE_API number.
Support for UInt8, Int8, and Int16 Attribute Types:
- (Added) HAPI_SetAttributeUInt8Data()
- (Added) HAPI_SetAttributeInt8Data()
- (Added) HAPI_SetAttributeInt16Data()
- (Added) HAPI_GetAttributeUInt8Data()
- (Added) HAPI_GetAttributeInt8Data()
- (Added) HAPI_GetAttributeInt16Data()
Set Array Attributes:
- (Added) HAPI_SetAttributeFloat64ArrayData()
- (Added) HAPI_SetAttributeFloatArrayData()
- (Added) HAPI_SetAttributeInt16ArrayData()
- (Added) HAPI_SetAttributeInt64ArrayData()
- (Added) HAPI_SetAttributeInt8ArrayData()
- (Added) HAPI_SetAttributeIntArrayData()
- (Added) HAPI_SetAttributeStringArrayData()
- (Added) HAPI_SetAttributeUInt8ArrayData()
HAPI_CookOptions Updates:
- (Added) HAPI_CookOptions::cacheMeshTopology: if this is set to true, cooking a mesh geometry will update only the topology if the number of points changed. Use this to get better performance on deforming meshes.
- (Changed) HAPI_CookOptions::splitGroupSH: added the ability to specify which group(s) the geometry should be split by when splitGeosByGroup is enabled.
Node Lookup:
- (Added) HAPI_GetNodeFromPath(): this function can be used to retrieve the HAPI_NodeId of a node given its scene path.
- (Added) HAPI_GetOutputGeoCount(): new method which can be used in conjunction with HAPI_GetOutputGeoInfos to locate the main geometry output nodes of an Object or SOP node.
- (Added) HAPI_GetOutputGeoInfos(): new method which can be used in conjunction with HAPI_GetOutputGeoCount to locate the main geometry output nodes of an Object or SOP node.
Custom Strings:
- (Changed) HAPI_SetCustomString(): multiple custom strings can now be stored with HAPI_SetCustomString.
Support for Edge Groups:
- (Added) HAPI_GroupType::HAPI_GROUPTYPE_EDGE: added a new edge group enumerator to the HAPI_GroupType enumeration.
- (Added) HAPI_GeoInfo::edgeGroupCount: specifies how many edge groups that the geometry has.
- (Added) HAPI_GetEdgeCountOfEdgeGroup(): gets the number of edges that belong to an edge group on a geometry part.
- (Changed) HAPI_GetGroupMembership(): this method now supports edge groups.
- (Changed) HAPI_SetGroupMembership(): this method now supports edge groups.
Support for Setting Compositor Options:
- (Added) HAPI_CompositorOptions struct
- (Added) HAPI_GetCompositorOptions()
- (Added) HAPI_SetCompositorOptions()
- (Added) HAPI_CompositorOptions_Init()
- (Added) HAPI_CompositorOptions_Create()
Server Configuration:
- (Changed) HAPI_SetServerEnvString(): in addition to setting the environment variable, this method will now update the variable in hscript (if it exists) and Python's os.environ.
- (Changed) HAPI_SetServerEnvInt(): in addition to setting the environment variable, this method will now update the variable in hscript (if it exists) and Python's os.environ.
Parameters:
- (Added) HAPI_ParmInfo::useMenuItemTokenAsValue: new flag that indicates whether the "Use Menu Item Token As Value" option is enabled on an integer menu item.
Licensing:
- (Added) The Houdini Engine for Unity/Unreal license now supports Unreal Engine 5.
- (Added) HAPI_License::HAPI_LICENSE_HOUDINI_ENGINE_UNITY_UNREAL: added a new enumerator to the HAPI_License enumeration that specifies the Houdini Engine for Unity/Unreal license.
Input Curves:
Added the concept of “Input Curves”, a set of helper functions aimed to marshall curve data directly into HAPI with validity checking and other functionalities.
- (Added) HAPI_CreateInputCurveNode(): Creates and sets up a HAPI input curve
- (Added) HAPI_InputCurveInfo struct
- (Added) HAPI_GetInputCurveInfo(): Retrieves data regarding the part’s input curve info.
- (Added) HAPI_SetInputCurveInfo(): Sets data regarding the part’s input curve info
- (Added) HAPI_SetInputCurvePositions(): Sets the curve CV positions for an input curve
- (Added) HAPI_SetInputCurvePositionsRotationsScales(): Sets the curve CV positions, as well as adds a specified rot and scale attribute to each CV.
Python Bindings:
- (Added) Better API documentation to the official Houdini docs.
- (Added) Structs now return a descriptive string when passed to repr(..)
- (Added) Structs fields can now be initialized by passing a list of keyword arguments to the constructor that match the field names.
What's New in HAPI 3.3
New Python HAPI Module
Query Array Attributes:
- (Added) HAPI_GetAttributeIntArrayData() to query int array attribute data.
- (Added) HAPI_GetAttributeInt64ArrayData() to query int64 array attribute data.
- (Added) HAPI_GetAttributeFloatArrayData() to query float array attribute data.
- (Added) HAPI_GetAttributeFloat64ArrayData() to query float64 array attribute data.
- (Added) HAPI_GetAttributeStringArrayData() to query string array attribute data.
SessionSync Updates:
- (Added) HAPI_Viewport struct to hold data to synchronize viewports in SessionSync.
- (Added) HAPI_GetViewport() will retrieve the HAPI_Viewport that Houdini has set.
- (Added) HAPI_SetViewport() will update HAPI_Viewport which Houdini will synchronize with.
- (Added) HAPI_SessionSyncInfo struct to hold SessionSync data for synchronizing state and settings.
- (Added) HAPI_GetSessionSyncInfo() will retrieve the HAPI_SessionSyncInfo that Houdini has set.
- (Added) HAPI_SetSessionSyncInfo() will update HAPI_SessionSyncInfo which Houdini will synchronize with.
Connection Errors:
- (Added) HAPI_ClearConnectionError() will clear the connection error.
- (Added) HAPI_GetConnectionErrorLength() will return the connection error string length.
- (Added) HAPI_GetConnectionError() will return the connection error string.
Save or Load Node:
- (Added) HAPI_SaveNodeToFile() saves a node network in current Houdini Engine session. Supports SOP/output, Object/subnet, and SOP/subnet. The node network is saved with all children and parm values.
- (Added) HAPI_LoadNodeFromFile() loads a node network in current Houdini Engine session. Supports SOP/output, Object/subnet, and SOP/subnet.
Houdini Time:
- (Added) HAPI_GetUseHoudiniTime() returns whether Houdini Engine should use the current Houdini timeline time for cooking.
- (Added) HAPI_SetUseHoudiniTime() sets Houdini Engine to use the current Houdini timeline time for cooking
SessionSync:
- (Added) HAPI_SetSessionSync() enables or disables SessionSync mode in Houdini Engine. Enabling this will let Houdini Engine know that that the session is being used in Houdini via SessionSync. For example, it will automatically use the Houdini timeline to cook instead of using the Houdini Engine time which defaults to 0, or whatever value the plugin has set via HAPI_SetTime.
Total Cook Count:
- (Added) HAPI_GetTotalCookCount() returns the total cook count of a node and its children. This allows to poll from the client side to see if node needs to be recooked in HAPI and its geometry regenerated.
HeightField Sampling:
- (Added) HAPI_HeightFieldSampling for specifying center or corner sampling for heightfield.
- (Added) HAPI_CreateHeightFieldInput() which takes in HAPI_HeightFieldSampling sampling argument to specify center or corner sampling.
- (Deprecated) HAPI_CreateHeightfieldInputNode().
Asset Definition Parms:
- (Added) HAPI_GetAssetDefinitionParmCounts(), HAPI_GetAssetDefinitionParmInfos(), and HAPI_GetAssetDefinitionParmValues() to query HAPI_ParmInfo and default parm values from asset definition without needing to create the asset node in session.
Display Flag:
- (Added) HAPI_SetNodeDisplay() to set the specified node's display flag.
Instances:
- (Deprecated) HAPI_GetInstanceTransforms() is now marked as deprecated. Use HAPI_GetInstanceTransformsOnPart() instead (using Part 0 for previous behaviour).
PDG:
- (Modified) HAPI_PDG_EventType has been changed to a non-bitmask integer type.
- (Added) HAPI_GetPDGGraphContextId() to get the PDG graph context for the specified TOP node.
What's New in HAPI 3.2
Initialization
- (Modified) HAPI_Initialize now tries to set the HFS environment variable if it was not manually setup before.
- (Modified) HAPI_CookOptions now has a checkPartChanges member that enables checking if newly refined part data matches the prior part data and will update HAPI_PartInfo.hasChanged accordingly.
- (Modified) HAPI_CookOptions now has a splitGeosByAttribute option that enable splitting geos by unique values of a specified attribute.
Asset
- (Added) HAPI_AssetInfo now has a geoOutputCount for the number of geometry outputs exposed by the asset.
Nodes
- (Modified) Fixed HAPI_DeleteNode destroying the parent OBJ when called on a SOP node. The parent OBJ is now destroyed only if it is empty.
- (Modified) Fixed HAPI_RenameNode not updating child nodes nor node-type parameters with the updated parent name in their paths.
- (Modified) HAPI_ConnectNodeInput uses an added output_index parameter to select the output to connect from.
- (Added) HAPI_DisconnectNodeOutputsAt to disconnect all of a node's output connections at the output index.
- (Added) HAPI_QueryNodeOutputConnectedCount and HAPI_QueryNodeOutputConnectedNodes to get the number/the nodes currently connected to the given node at the output index.
- (Modified) HAPI_NodeInfo now has the number of outputs that the specific node has in the outputCount member.
- (Modified) HAPI_NodeInfo now has a "isTimeDependent" boolean member to describe if the node's results will change over time.
- (Modified) Added HAPI_NODEFLAGS_SOP_GUIDE to HAPI_NodeFlags, this allows guide geometry to be queried from an asset when using HAPI_ComposeChildNodeList.
Parameters
- (Added) HAPI_ParmHasExpression, HAPI_GetParmExpression, HAPI_SetParmExpression and HAPI_RemoveParmExpression to check, get, set and remove expressions on float and int parms.
- (Added) HAPI_RevertParmToDefault/HAPI_RevertParmToDefaults to revert a single/all instances of a parm to its default.
- (Modified) Fixed HAPI_GetParmNodeValue throwing error due to checking wrong index.
- (Modified) Changed the HAPI_ParmType order so the new HAPI_PARMTYPE_PATH_FILE_DIR type is at the end to avoid serialization issues.
- (Modified) Added HAPI_ParmInfo.scriptType and the HAPI_PrmScriptType enum. This corresponds to the houdini-type as shown in the Type Properties window and the tokens used in DialogScript files.
- (Modified) Fixed an issue with HAPI treating logarithmic int parms as floats.
- (Modified) Fixed HAPI_ParmHasExpression() returning true when the parameter had no expression.
Attributes
- (Added) HAPI_DeleteAttribute to delete an attribute on an input geo. (input nodes only).
- (Modified) HAPI_ParmInfo now has visibilityConditionSH and disabledConditionSH member to access the parameters "Hide When" and "Disable When" condition strings.
- (Modified) It is now possible to add/set attribute on input volumes, HAPI_PartInfo now indicates the proper number of attributes for volumes, as well as their point/vertex/face counts.
Groups
- (Added) HAPI_DeleteGroup to remove a group from an input geo.
Packed Primitives
- (Added)Added HAPI_GetGroupCountOnPackedInstancePart, HAPI_GetGroupNamesOnPackedInstancePart, HAPI_GetGroupMembershipOnPackedInstancePart for getting the number of groups, their names an membership values in a packed primitive part,
PDG
- (Added) HAPI_GetPDGGraphContexts that returns an array of PDG graph context names and ids
- (Added) HAPI_CookPDG to start a PDG cooking operation.
- (Added) HAPI_GetPDGEvents to returns the PDG events that have been collected.
- (Added) HAPI_GetPDGState that returns the state of a PDG graph.
- (Added) HAPI_CreateWorkitem to create a new pending workitem for the given node.
- (Added) HAPI_GetWorkitemInfo that retrieves the info of a given workitem by id.
- (Added) HAPI_SetWorkitemIntData, HAPI_SetWorkitemFloatData and HAPI_SetWorkitemStringData to add integer/float/string data to a pending PDG workitem data member for a given node.
- (Added) HAPI_CommitWorkitems to commit any pending workitems.
- (Added) HAPI_GetNumWorkitems returns the number of workitems that are available on a given node.
- (Added) HAPI_GetWorkitems to return the list of workitem ids for the given node
- (Added) HAPI_GetWorkitemDataLength to get the length of the workitem data member.
- (Added) HAPI_GetWorkitemIntData, HAPI_GetWorkitemFloatData and HAPI_GetWorkitemStringData to get the int/float/string data from a work item member.
- (Added) HAPI_GetWorkitemResultInfo to access the info for workitem results
- (Added) HAPI_PausePDGCook and HAPI_CancelPDGCook to respectivelypause or cancel a PDG cooking operation.
- (Added) HAPI_DirtyPDGNode to dirty a given node.
- (Added) HAPI_PDG_State, HAPI_PDG_EventType, HAPI_PDG_Workitem enums.
- (Added) HAPI_PDG_EventInfo, HAPI_PDG_WorkitemInfo, HAPI_PDG_WorkitemResultInfo structs.
- (Modified) Added PDG cook event message string handle (msgSH) to HAPI_PDG_EventInfo, that contains the cook event's message/error if it has one.
Environment
- (Added) HAPI_GetServerEnvVarCount() to get the number of env vars that are in the server environment's process
- (Added) HAPI_GetServerEnvVarList() provides a list of all the environment variables in the server's process
Heightfield
- (Added) HAPI_CreateHeightfieldInputNode to create and initialize the nodes needed for Heightfields.
- (Added) HAPI_CreateHeightfieldInputVolumeNode to create and initialize an Input volume node that can be used as additional mask for Heightfields.
Instances
- (Added) Added HAPI_GetInstanceTransformsOnPart() that works like HAPI_GetInstanceTransforms(), but the partId can be specified.
- (Modified) Fixed point instancers sometimes being ignored because HAPI_GetInstanceTransforms() was only looking for point instancer in part 0.
Strings
- (Added) HAPI_GetStringBatchSize and HAPI_GetStringBatch allow batching string value queries for effectiveness.
- (Added) HAPI_SetCustomString and HAPI_RemoveCustomString to add/remove strings to the string table. Access to the string is the responsibility of the caller. The intended use for custom strings is to allow structs that reference strings to be passed in to HAPI
Utilities
- (Modified) Fixed HAPI_ConvertTransformQuatToMatrix returning incorrect values when converting radians to degrees.
Materials
- (Modified) Fixed a bug where HAPI_ExtractImageToFile() was writing out corrupt image.
- (Added) Added HAPI_GetImageFilePath to get the path that a texture would be extracted to. This avoids doing the actual extract (whic is slow) just to get the path.
Handles
- (Modified) added "assetParmIndex" field to the HAPI_HandleBindingInfo that is set to the index of the bound component attribute for int, float vector and color parameters.
What's New in HAPI 3.1
Sessions
- (New) HAPI_ThriftServerOptions struct added for better argument management.
- (Modified) HAPI_StartThriftSocketServer() and HAPI_StartThriftNamedPipeServer() will now take the new HAPI_ThriftServerOptions struct containing the port and timeout instead of separate parameters.
Initialization
- (Modified)
HAPI_SetEnvFiles()
removed in favor of a new houdini_environment_files
parameter on HAPI_Initialize().
- (New) HAPI_CookOptions::extraFlags member added for internal use.
Diagnostics
- (New) HAPI_ComposeNodeCookResult(), HAPI_GetComposedNodeCookResult(), and HAPI_CheckForSpecificErrors() added to help with getting errors and warnings on specific nodes.
- (New) HAPI_ErrorCode enum added for use with HAPI_CheckForSpecificErrors().
Utility
- (New) All HAPI transforms now have shear support.
- (New) HAPI_SHEAR_VECTOR_SIZE define added for shear support.
- (New) HAPI_Transform::shear[] added for shear support.
- (New) HAPI_TransformEuler::shear[] added for shear support.
Assets
- (Removed)
HAPI_AssetId
typedef removed since it is now just a HAPI_NodeId.
- (Removed)
HAPI_AssetInfo::id
member since it is now just a HAPI_NodeId and that is already stored in HAPI_AssetInfo::nodeId.
- (Removed)
HAPI_AssetType
enum removed in favor of the HAPI_NodeType enum.
- (Removed)
HAPI_AssetSubType
enum as the distinction is no longer relevant.
- (Removed)
HAPI_AssetInfo::type
and HAPI_AssetInfo::subType
remove as they are no longer used.
- (Removed)
HAPI_AssetInfo::validationId
removed in favor of HAPI_NodeInfo::uniqueHoudiniNodeId.
- (Removed)
HAPI_IsAssetValid()
removed in favor of the new HAPI_IsNodeValid().
- (Removed)
HAPI_InstantiateAsset()
removed in favor of HAPI_CreateNode().
- (Removed)
HAPI_CreateCurve()
removed in favor of HAPI_CreateNode().
- (Removed)
HAPI_CreateInputAsset()
removed in favor of HAPI_CreateInputNode().
- (Removed)
HAPI_DestroyAsset()
removed in favor of HAPI_DeleteNode().
- (Modified) HAPI_GetAssetInfo() now takes a HAPI_NodeId instead of
HAPI_AssetId
.
- (Removed)
HAPI_CookAsset()
now removed in favor of HAPI_CookNode().
- (Removed)
HAPI_GetAssetTransform()
removed in favor of HAPI_GetObjectTransform().
- (Removed)
HAPI_SetAssetTransform()
removed in favor of HAPI_SetObjectTransform().
- (Removed)
HAPI_GetInputName()
removed in favor of HAPI_GetNodeInputName() for node inputs and HAPI_GetParmInfo(), then getting the HAPI_ParmInfo::nameSH, for inputs that are actually exposed node path parameters.
- (Removed)
HAPI_GetEditableNodeNetworks()
and HAPI_AssetInfo::editableNodeNetworkCount
removed in favor of HAPI_ComposeChildNodeList().
- (Modified)
HAPI_AssetInfo::geoInputCount
only lists node inputs. Object path parameters are not counted in this variable anymore.
HIP Files
- (Removed)
HAPI_CheckForNewAssets()
and HAPI_GetNewAssetIds()
have been removed in favor of HAPI_ComposeChildNodeList() and HAPI_GetComposedChildNodeList() called on the HAPI_NODETYPE_OBJ manager node with recursive
set to false
.
Nodes
- (New) HAPI_NodeType enum added to replace the
HAPI_AssetType
enum.
- (New) HAPI_NodeInfo::type member added to store the node type.
- (New) HAPI_NodeInfo::parentId member added to easily get a node's parent node id.
- (New) HAPI_IsNodeValid() added to replace
HAPI_IsAssetValid()
.
- (New) HAPI_GetNodePath() added to more easily get absolute or relative node paths.
- (New) HAPI_GetManagerNodeId() added to get the HAPI_NodeId for any top-level manager node (ie. "/obj").
- (New) HAPI_ComposeChildNodeList() and HAPI_GetComposedChildNodeList() added to make it easier to get a filtered list of child nodes under any node. Replaces
HAPI_GetNodeNetworkChildren()
.
- (Removed)
HAPI_GetNodeNetworkChildren()
removed in favor of HAPI_ComposeChildNodeList() and HAPI_GetComposedChildNodeList().
- (Modified) HAPI_CreateNode():
- Is now an asynchronous function.
- Will now accept output from HAPI_GetAvailableAssets() which is the fully qualified name of the node and operator table. For this workflow, the
parent_node_id
should be -1.
- (New) HAPI_CreateInputNode() added to replace
HAPI_CreateInputAsset()
.
- (New) HAPI_CookNode() added to be able to cook an individual node, which includes asset nodes.
- (New) HAPI_GetNodeInputName() added to get the name of a node input.
Parameters
- (Modified)
HAPI_PARMTYPE_PATH_NODE
was changed to HAPI_PARMTYPE_NODE.
- (New) HAPI_PARMTYPE_FOLDERLIST_RADIO enum added for the new radio tabs support.
- (New) HAPI_ParmInfo::tagCount member added for tags support.
- (New) HAPI_GetParmTagName() added to get a parameter tag name on a parameter.
- (New) HAPI_GetParmTagValue() added to get a parameter tag value on a parameter tag.
- (New) HAPI_ParmHasTag() added to quickly check if a parameter has a specific tag.
- (New) HAPI_GetParmWithTag() added to quickly find a parameter with a specific tag.
- (New) HAPI_GetParmNodeValue() and HAPI_SetParmNodeValue() added to get/set a HAPI_NodeId given a node path parameter, instead of just getting the node path string. These replace
HAPI_ConnectAssetTransform
, HAPI_DisconnectAssetTransform
, HAPI_ConnectAssetGeometry
, and HAPI_DisconnectAssetGeometry
.
- (New) HAPI_ParmInfo::typeInfoSH member will now also indicate the OP node filter on OP node path parameters.
- (New) HAPI_ParmInfo::inputNodeType and HAPI_ParmInfo::inputNodeFlag members added to easily get the node type and flags linked by a OP Node path parameter.
Handles
- (Modified) HAPI_GetHandleInfo() and HAPI_GetHandleBindingInfo() now take a HAPI_NodeId instead of a
HAPI_AssetId
.
Objects
- (New) HAPI_ObjectInfo::isInstanced member added to easily tell if an object node is being instanced.
- (New) HAPI_ATTRIB_INSTANCE define added for the "instance" attribute name.
- (Removed)
HAPI_ObjectId
typedef removed since it is now just a HAPI_NodeId.
- (Removed)
HAPI_ObjectInfo::id
member since it is now just a HAPI_NodeId and that is already stored in HAPI_ObjectInfo::nodeId.
- (Removed)
HAPI_GetObjects()
removed in favor of HAPI_ComposeObjectList() and HAPI_GetComposedObjectList().
- (Removed)
HAPI_GetObjectTransforms()
removed in favor of HAPI_ComposeObjectList() and HAPI_GetComposedObjectTransforms().
- (New) HAPI_GetObjectInfo() added for convenience.
- (New) HAPI_GetObjectTransform() added for convenience.
- (New) HAPI_ComposeObjectList(), HAPI_GetComposedObjectList(), and HAPI_GetComposedObjectTransforms() added to replace
HAPI_GetObjects()
and HAPI_GetObjectTransforms()
.
- (New) HAPI_GetInstancedObjectIds() added to get the node ids of the objects being instanced.
- (Modified) ::HAPI_GetInstanceTransforms() and HAPI_SetObjectTransform() now just take the node id of the instancer object, instead of asset id, object id, and geo id.
Geos
- (Removed)
HAPI_GeoId
typedef removed since it is now just a HAPI_NodeId.
- (Removed)
HAPI_GeoInfo::id
member since it is now just a HAPI_NodeId and that is already stored in HAPI_GeoInfo::nodeId.
- (New) HAPI_GetDisplayGeoInfo() added to quickly give you the display SOP node id inside an object node.
- (Modified) HAPI_GetGeoInfo(), HAPI_GetPartInfo(), HAPI_GetFaceCounts(), HAPI_GetVertexList(), HAPI_GetAttributeInfo(), HAPI_GetAttributeNames(), HAPI_GetAttributeIntData(), HAPI_GetAttributeInt64Data(), HAPI_GetAttributeFloatData(), HAPI_GetAttributeFloat64Data(), HAPI_GetAttributeStringData(), HAPI_GetGroupNames(), HAPI_GetGroupMembership(), HAPI_GetInstancedPartIds(), HAPI_GetInstancerPartTransforms(), HAPI_SetPartInfo(), HAPI_SetFaceCounts(), HAPI_SetVertexList(), HAPI_AddAttribute(), HAPI_SetAttributeIntData(), HAPI_SetAttributeInt64Data(), HAPI_SetAttributeFloatData(), HAPI_SetAttributeFloat64Data(), HAPI_SetAttributeStringData(), HAPI_AddGroup(), HAPI_SetGroupMembership(), HAPI_CommitGeo(), and HAPI_RevertGeo() now just take the HAPI_NodeId of the SOP node, instead of the asset, object, geo ids.
- (Modified) HAPI_GetAttributeIntData() now takes an extra optional
stride
argument.
- (Modified) HAPI_GetGroupMembership() now takes an extra optional
membership_array_all_equal
argument.
- (Removed)
HAPI_SetGeoInfo()
removed as it never did anything anyway.
- (Modified) HAPI_AddGroup() now takes a
HAPI_PartId
argument.
- (Modified) HAPI_StorageType enum order has changed.
- (New) HAPI_CookOptions::splitPointsByVertexAttributes member added to enable face and vertex reduction optimization by creating more points to make attributes unshared.
- (Modified)
HAPI_PartInfo::pointAttributeCount
, HAPI_PartInfo::pointAttributeCount
, HAPI_PartInfo::pointAttributeCount
, and HAPI_PartInfo::pointAttributeCount
have been converted to a single member that is an array of counts, called HAPI_PartInfo::attributeCounts[].
Inter-Asset Connections
- (Removed)
HAPI_ConnectAssetTransform
, HAPI_DisconnectAssetTransform
, HAPI_ConnectAssetGeometry
, and HAPI_DisconnectAssetGeometry
removed in favor of HAPI_GetParmNodeValue(), HAPI_SetParmNodeValue(), HAPI_ConnectNodeInput(), and HAPI_DisconnectNodeInput().
- (Removed)
HAPI_GeoInputInfo
struct removed as it is no longer used.
Materials
- (Removed)
HAPI_MaterialId
typedef removed since it is now just a HAPI_NodeId.
- (Removed)
HAPI_MaterialInfo::id
member since it is now just a HAPI_NodeId and that is already stored in HAPI_MaterialInfo::nodeId.
- (Removed)
HAPI_GetMaterialIdsOnFaces()
in favor of HAPI_GetMaterialNodeIdsOnFaces().
- (New) HAPI_GetMaterialNodeIdsOnFaces() added to replace
HAPI_GetMaterialIdsOnFaces()
.
- (Modified) HAPI_GetMaterialInfo(), HAPI_RenderTextureToImage(), HAPI_GetImageInfo(), HAPI_SetImageInfo(), HAPI_GetImagePlaneCount(), HAPI_GetImagePlanes(), HAPI_ExtractImageToFile(), HAPI_ExtractImageToMemory(), and HAPI_GetImageMemoryBuffer() now just take the HAPI_NodeId of the material node instead of the asset id and old material id.
- (Removed)
HAPI_GetMaterialOnPart()
removed in favor of HAPI_GetMaterialNodeIdsOnFaces().
- (Removed)
HAPI_GetMaterialOnGroup()
removed in favor of HAPI_GetMaterialNodeIdsOnFaces().
- (New) HAPI_RenderCOPToImage() added to allow direct COP node render to an image.
- (New) All material APIs now also work with the new VOP-based materials.
- (Removed)
HAPI_MaterialInfo::assetId
removed as the material is no longer specific to an asset.
Simulation/Animation
- (Modified) HAPI_ResetSimulation() now takes a HAPI_NodeId instead of a
HAPI_AssetId
.
Volumes
- (Modified) HAPI_GetVolumeInfo(), HAPI_GetFirstVolumeTile(), HAPI_GetNextVolumeTile(), HAPI_GetVolumeVoxelFloatData(), HAPI_GetVolumeTileFloatData(), HAPI_GetVolumeVoxelIntData(), HAPI_GetVolumeTileIntData(), HAPI_SetVolumeInfo(), HAPI_SetVolumeTileFloatData(), and HAPI_SetVolumeTileIntData() now take just a HAPI_NodeId instead of the asset id, object id, and geo id.
- (New) HAPI_GetHeightFieldData() and HAPI_SetHeightFieldData() added to easily get/set height field 2D volume data as a flat array.
- (New) HAPI_SetVolumeVoxelFloatData(), HAPI_SetVolumeVoxelIntData() added to set individual voxel values on volumes.
- (New) HAPI_GetVolumeBounds() added to easily access a volume's minimum, maximum and center bound values.
Curves
- (Modified) HAPI_GetCurveInfo(), HAPI_GetCurveCounts(), HAPI_GetCurveOrders(), HAPI_GetCurveKnots(), HAPI_SetCurveInfo(), HAPI_SetCurveCounts(), HAPI_SetCurveOrders(), and HAPI_SetCurveKnots() now take just a HAPI_NodeId instead of the asset id, object id, and geo id.
Basic Primitives
- (New) HAPI_PARTTYPE_BOX and HAPI_PARTTYPE_SPHERE part type enums added for the new primitive types.
- (New) HAPI_CookOptions::handleBoxPartTypes and HAPI_CookOptions::handleSpherePartTypes members added to enable or disable handling of the new primitive types.
- (New) HAPI_GetBoxInfo() added to get information for reproducing a box primitive.
- (New) HAPI_GetSphereInfo() added to get information for reproducing a sphere primitive.
- (New) HAPI_BoxInfo struct added for box primitive support.
- (New) HAPI_SphereInfo struct added for sphere primitive support.
Caching
- (Modified) HAPI_SaveGeoToFile(), HAPI_LoadGeoFromFile(), HAPI_GetGeoSize(), HAPI_SaveGeoToMemory(), and HAPI_LoadGeoFromMemory() now take just a HAPI_NodeId instead of the asset id, object id, and geo id.
Atributes
- (New) HAPI_AttributeInfo now has a HAPI_AttributeTypeInfo member that can be used to determine the attribute's purpose/type without solely relying on its name.
- (New) Added the HAPI_AttributeTypeInfo enum to describe an attribute's type.
Migration from HAPI 2.X to HAPI 3.X
- Note
- In HAPI3.0, object path parameters are no more considered as inputs and will not be counted with the SOP inputs in HAPI_NodeInfo::inputCount. Instead you should look for them in the asset's parameter list. Object path parameters will have their HAPI_ParmInfo::type set to HAPI_PARMTYPE_NODE type and should have their HAPI_ParmInfo::inputNodeType set to HAPI_NODETYPE_ANY, HAPI_NODETYPE_SOP or HAPI_NODETYPE_OBJ. Since these nodes are already object_merges, it is no longer necessary to connect them using HAPI_ConnectNodeInput(). You should instead connect them using HAPI_SetParmNodeValue() with the node id of the input node you created. See Inter-Asset Connections for more info.
Sessions
bool auto_close = true;
int port = 5;
float timout_ms = 1000;
Initialization
int cooking_thread_stack_size = -1;
const char * houdini_environment_files = "~/file1.env:~/file2.env";
const char * otl_search_path = nullptr;
const char * dso_search_path = nullptr;
const char * image_dso_search_path = nullptr;
const char * audio_dso_search_path = nullptr;
HAPI_SetEnvFiles( &session, houdini_environment_files );
&session, &cook_options, use_cooking_thread,
cooking_thread_stack_size,
otl_search_path,
dso_search_path,
image_dso_search_path,
audio_dso_search_path
);
&session, &cook_options, use_cooking_thread,
cooking_thread_stack_size,
houdini_environment_files,
otl_search_path,
dso_search_path,
image_dso_search_path,
audio_dso_search_path
);
Assets
Checking validity:
int answer = 0;
int asset_validation_id = 0;
HAPI_IsAssetValid( &session, asset_id, asset_validation_id, &answer );
int answer = 0;
int unique_node_id = 0;
Instantiating:
const char operator_name = "SOP/HAPI_Test_Assets_SOP";
HAPI_InstantiateAsset( nullptr, operator_name, true, &asset_id );
Creating a curve:
HAPI_CreateCurve( nullptr, &asset_id );
Creating the input asset:
HAPI_CreateInputAsset( nullptr, &asset_id, "input_asset" );
Destroying an asset:
HAPI_DestroyAsset( nullptr, asset_id );
Cooking an asset:
HAPI_AssetId asset_id = 0;
HAPI_CookAsset( nullptr, asset_id, nullptr );
Getting and setting asset tranform:
HAPI_GetAssetTransform( nullptr, asset_id, rst_order, rot_order, &transform_euler );
HAPI_SetAssetTransform( nullptr, asset_id, &transform_euler );
Getting asset input name:
int node_input_idx = 0;
int parameter_input_idx = 1;
HAPI_GetInputName( nullptr, asset_id, node_input_idx, (int) input_type, &name );
HAPI_GetInputName( nullptr, asset_id, parameter_input_idx, (int) input_type, &name );
HIP Files
int new_asset_count = 0;
HAPI_CheckForNewAssets( nullptr, &new_asset_count );
std::vector< HAPI_AssetId > asset_ids_array( new_asset_count );
HAPI_GetNewAssetIds( nullptr, asset_ids_array.data(), new_asset_count );
int child_node_count = 0;
const bool recursive = false;
HAPI_ComposeChildeNodeList(
std::vector< HAPI_NodeId > child_nodes( child_node_count );
nullptr, obj_manager, child_nodes.data(), child_node_count );
Nodes
Getting all editable networks in an asset:
HAPI_AssetId asset_id = <Returned by HAPI_InstantiateAsset()>;
HAPI_GetEditableNodeNetworks(
nullptr, asset_id, &editable_network_node_id, 1 ) );
int editable_network_count = 0;
const bool recursive = true;
nullptr, node_id,
recursive,
&editable_network_count );
std::vector< HAPI_NodeId > editable_networks( editable_network_count );
nullptr, node_id, editable_networks.data(), editable_network_count );
Objects
Get all object infos and their transforms in an asset.
std::vector< HAPI_ObjectInfo > object_infos( asset_info.
objectCount );
HAPI_GetObjects(
nullptr, asset_info.id, object_infos.data(), 0, asset_info.
objectCount );
std::vector< HAPI_Transform > object_transforms( asset_info.
objectCount );
HAPI_GetObjectTransforms(
nullptr, asset_info.id, rst_order, object_transforms.data(), 0, asset_info.
objectCount );
int object_count = 0;
std::vector< HAPI_ObjectInfo > object_infos( object_count );
nullptr, asset_node_id, object_infos.data(), 0, object_count );
std::vector< HAPI_Transform > object_transforms( object_count );
nullptr, asset_node_id, rst_order, object_transforms.data(), 0, object_count );
Get object instance transforms from an instancer object.
std::vector< HAPI_Transform > instance_transforms( geo_point_count );
HAPI_GetInstanceTransforms(
nullptr, asset_id, object_id, geo_id, rst_order,
instance_transforms.data(), 0, geo_point_count );
std::vector< HAPI_Transform > instance_transforms( geo_point_count );
HAPI_GetInstanceTransforms(
nullptr, object_node_id, rst_order,
instance_transforms.data(), 0, geo_point_count );
Geometry
Get and set geometry information (assuming asset has a single object).
HAPI_AssetId asset_id;
HAPI_InstantiateAsset( nullptr, ..., &asset_id );
HAPI_ObjectId object_id = 0;
HAPI_GeoId geo_id = 0;
int object_count = 0;
nullptr, asset_node_id, &object_node_id, 0, object_count );
Inter-Asset Connections
int node_input_idx = 0;
int parameter_input_idx = 1;
HAPI_AssetId asset_a = 1;
HAPI_ObjectId asset_a_obj = 0;
HAPI_AssetId asset_b = 2;
HAPI_ConnectAssetTransform( nullptr, asset_a, asset_b, node_input_idx )
HAPI_DisconnectAssetTransform( nullptr, asset_b, node_input_idx );
HAPI_ConnectAssetGeometry( nullptr, asset_a, asset_a_obj, asset_b, node_input_idx );
HAPI_DisconnectAssetGeometry( nullptr, asset_b, node_input_idx );
HAPI_ConnectAssetTransform( nullptr, asset_a, asset_b, parameter_input_idx )
HAPI_DisconnectAssetTransform( nullptr, asset_b, parameter_input_idx );
HAPI_ConnectAssetGeometry( nullptr, asset_a, asset_a_obj, asset_b, parameter_input_idx );
HAPI_DisconnectAssetGeometry( nullptr, asset_b, parameter_input_idx );
const char * input_parm_name = "coord";
Materials
Getting material assignments and material infos.
HAPI_PartInfo part_info = <the part info of the part with the material>;
std::vector< HAPI_MaterialId > materials( part_info.
faceCount );
HAPI_GetMaterialIdsOnFaces(
nullptr, asset_id, object_id, geo_id, part_info.
id,
&are_all_the_same, materials.data(), 0, part_info.
faceCount );
HAPI_PartInfo part_info = <the part info of the part with the material>;
std::vector< HAPI_NodeId > materials( part_info.
faceCount );
nullptr, sop_node_id, part_info.nodeId, &are_all_the_same,