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.