I found a workaround for my specific need, but I decided to experiment with inlinecpp. But I can't figure out how to get the name and type of an attribute using the HDK. Anyone have some tips on how I could print out, as an example:
my_vec2_array_attr, vec2 array fooVector, vec3 etc...
This is what I've cobbled together based on the HDK examples and graham's github repo (thank you graham!!!!).
Thanks in advance!
—————————————–
attribUtils = inlinecpp.createLibrary("attribUtils", includes=""" #include <GU/GU_Detail.h> #include <GA/GA_Attribute.h> #include <UT/UT_OrderedIterator.h> """, structs=[ ("StringArray", "**c"), ], function_sources=[""" StringArray getPointAttribArray(const GU_Detail *gdp) { std::vector<std::string> result; const GA_AttributeDict *dict; const GA_Attribute *source_attr; //const GA_AttributeType *attr_type; //GA_AttributeType attr_type; UT_String attribute_name; GA_ROAttributeRef gah; dict = &gdp->pointAttribs(); for (GA_AttributeDict::iterator it=dict->begin(GA_SCOPE_PUBLIC); !it.atEnd(); ++it) { source_attr = it.attrib(); std::string aname = source_attr->getName(); result.push_back(aname); GA_StorageClass sclass = source_attr->getStorageClass(); GA_TypeInfo typeinfo = source_attr->getTypeInfo(); // Debug printing... std::cout << aname << " \t" << typeinfo << std::endl; } return result; } """])