Guest mantragora Posted August 12, 2012 Share Posted August 12, 2012 Hey Orbolts So I wanted to iterate over groups but I don't want to use "GA_FOR_ALL_PRIMGROUPS". Other possibility is to use iterators in for{} loop. Code below is straight ctrl+C/ctrl+V from HDK documentation. And it gives me error you can see in attached image. for (GA_GroupTable::iterator<GA_ElementGroup> it = gdp->primitiveGroups().begin(); !it.atEnd(); ++it) { // TODO: write your code } At first I thought that some #includes are missing but after whole day messing around it I'm out of ideas what is wrong. My icludes: #include <UT/UT_DSOVersion.h> #include <UT/UT_Interrupt.h> #include <GU/GU_Detail.h> #include <PRM/PRM_Include.h> #include <PRM/PRM_ChoiceList.h> #include <OP/OP_Operator.h> #include <OP/OP_OperatorTable.h> #include <GA/GA_ElementGroup.h> #include <GA/GA_ElementGroupTable.h> #include <ostream> #include <functional> #include <algorithm> #include <string> #include <vector> #include <iostream> Any ideas ? Thanks. Quote Link to comment Share on other sites More sharing options...
edward Posted August 12, 2012 Share Posted August 12, 2012 I don't see any GA_ElementGroupTable::begin() method. Perhaps try beginTraverse(). Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted August 12, 2012 Share Posted August 12, 2012 Actually there is but it's not a public method. I didn't checked this because I assumed that "Iterating Over Groups" example in help is correct. BeginTraverse() did the trick. Thank you. Quote Link to comment Share on other sites More sharing options...
edward Posted August 12, 2012 Share Posted August 12, 2012 The interface probably changed after the docs was written. It would really help if you guys could log documentation bugs to have it fixed. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.