[Sidefx-houdini-list] HDK and help with Primitive groups...
kickaha at ponto-dot.com
Thu Jul 6 19:06:16 EDT 2006
> If you look in GB/GB_Macros.h, you'll find a #define for what you need.
> #define FOR_ALL_PRIMGROUPS(gdp, grp) \
> for (grp=(GB_PrimitiveGroup *)gdp->primitiveGroups().head(); grp; \
> grp=(GB_PrimitiveGroup *)grp->next())
> This will iterate over all primitive groups. Also look at GB/GB_ExtraMacros.h.
> This has more useful definitions.
Thanks, this is exactly what i was looking for, it is pretty
straightforward after all, it's funny how things seem so easy once we
> As for the shaders, the attribute is of type GB_ATTRIB_INDEX, which means that
> the attribute itself is just an integer which indexes to a string in a table.
> Since there are usually a handful of shader strings with many primitives which
> point to them, they cleverly used this method instead of having each primitive
> have a full copy of the shader string. Get a pointer from the gdp to the
> GB_Attribute which holds the shader, then use GB_Attribute::getIndexSize() and
> GB_Attribute::getIndex(int) to get the string values. No need to traverse all
> the primitives, just query the attribute.
> These are defined in GB/GB_AttributeDefines.h and GB/GB_Attribute.h
Thanks, i still feel a bit lost about the steps involved when dealing
with attributes, but i'm sure i'll be up to it in no time.
Well, there's someting like documentation in the toolkit dir, i has
just a few examples and focus only on the most important methods of the
classes. I am also checking the Doxygen pages found at odfwiki,
although i must say it's weird that i actually need to dive into the
header files as most of the explanations have not propagated to the
doxygen html files.
Once again, thank you very much for your answers, they have opened up
new doors for me ;)
More information about the Sidefx-houdini-list