Fixed an issue where attribute names would be populated when there were zero attributes to populate.
@@ -2141,6 +2141,9 @@ OutputGeometryPart::computeExtraAttributes(
const int &attributeCount = attributeCounts[i];
std::vector<HAPI_StringHandle> ownerAttributeNames(attributeCount);
+
+ if (attributeCount > 0)
+ {
HAPI_GetAttributeNames(Util::theHAPISession.get(), myNodeId, myPartId,
owner, &ownerAttributeNames[0],
attributeCount);
@@ -2153,6 +2156,7 @@ OutputGeometryPart::computeExtraAttributes(
HAPI_GetStringBatch(
Util::theHAPISession.get(), &attributeNames[i][0], stringsbuffer_len);
}
+ }
for (size_t i = 0; i < HAPI_ATTROWNER_MAX; i++)
{
