HDK: how to list attribute dictionary?

   3289   3   0
User Avatar
Member
128 posts
Joined: July 2005
Offline
It looks, like Attribute dictionary classes derived from linked lists, but I can't understand at all, which way to work with them is good. Okay, we can use “find” method to find attribue by name, GB_Attribute* getHead() is useful too, to start attribute listing, but what we have to do, to get next attributes, following first? Using offsets, calculated from actual attribute data, or explicitly cast linked list nodes to GB_Attribute type, or what?

Thank you!
Anything that flies
User Avatar
Member
89 posts
Joined: April 2008
Offline
If you use the GB_AttributeHandle interface you can iterate though the attributes with its get/set accessors.

Cant really help with GB_AttributeDict… it looks like you can use getFloatOffsets and getVectorOffsets?
User Avatar
Member
7737 posts
Joined: July 2005
Offline
I recommend using a GEO_AttributeHandleList. See its example usage here: http://www.sidefx.com/docs/hdk10.0/hdk_geometry_intro.html [sidefx.com]
User Avatar
Member
128 posts
Joined: July 2005
Offline
Thank you! I'll try!
May you provide some code snippet?
Anything that flies
  • Quick Links