Search - User list
Full Version: Question about getting HAPI_ATTROWNER_VERTEX attributes from the hda file
Root » Houdini Engine API » Question about getting HAPI_ATTROWNER_VERTEX attributes from the hda file
VincentKK
Hello,

I made a test hda file for HAPI testing, and I tried to get the attributes from the ‘Part’, and when the attribute owner was ‘HAPI_ATTROWNER_POINT’, ‘HAPI_ATTROWNER_PRIM’ or ‘HAPI_ATTROWNER_DETAIL’, it worked well, I got all the data from those 3 owners.

But when the owner is ‘HAPI_ATTROWNER_VERTEX’, the attributeCounts of HAPI_PartInfo is 0, anyone knows what the problems is? I can see the vertex data in Houdini.
seelan
How are you querying the vertex attribute data?

Something like this should just work:
HAPI_GetAttributeInfo(session, nodeId, geoId, 0, "test_vertex_float", HAPI_ATTROWNER_VERTEX, attributeInfo);
HAPI_GetAttributeFloatData(session, nodeId, 0, "test_vertex_float", attributeInfo, -1, dataArray, 0, attributeInfo.count);
VincentKK
seelan
How are you querying the vertex attribute data?

Something like this should just work:
HAPI_GetAttributeInfo(session, nodeId, geoId, 0, "test_vertex_float", HAPI_ATTROWNER_VERTEX, attributeInfo);
HAPI_GetAttributeFloatData(session, nodeId, 0, "test_vertex_float", attributeInfo, -1, dataArray, 0, attributeInfo.count);
Hi,
Thank you for the reply. I get the PartInfo like this:
HAPI_GetPartInfo(nullptr, m_nAssetNodeId, nPartId, &sPartInfo)
and the attributeCounts array of sPartInfo is (0, 11, 2, 3), corresponding to HAPI_ATTROWNER_VERTEX, HAPI_ATTROWNER_POINT, HAPI_ATTROWNER_PRIM and HAPI_ATTROWNER_DETAIL, meaning that there is no attribute when the owner is HAPI_ATTROWNER_VERTEX, the counts of the other 3 owners are correct.

I have tried:
HAPI_GetAttributeInfo(nullptr, m_nAssetNodeId, nPartId, “test_vertex_float”, HAPI_ATTROWNER_VERTEX, &sAttrInfo);
both the m_nAssetNodeId and the nPartId were 0,
and after the execution of this function, sAttrInfo.exists was false, the values of other member variables were -858993460, obviously, the sAttrInfo was invalid.

I wonder if there are some problems in the hda file.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB