resonanz 0 Posted August 25, 2015 (edited) If I have a point attribute of type array, how can I get that array and store the values in a UT_FloatArray? I tried the following but somehow it does not work. GA_ROHandleFA distH(gdp, GA_ATTRIB_POINT, "dist"); UT_FloatArray distances; for(GA_Iterator it(gdp->getPointRange()); !it.atEnd(); it.advance()) { GA_Offset offset = it.getOffset(); distances = distH(offset); } Thanks in advance! Edited August 26, 2015 by resonanz Share this post Link to post Share on other sites
MrScienceOfficer 53 Posted August 26, 2015 Well its usually best to say why something doesn't work, so someone can have a starting point to figure out the problem. From what I see though, you're assigning a float value to UT_FloatArray. A float is not a UT_FloatArray. Your attempting to make UT_FloatArray == float, when what you want to is store the float inside the array object. distances.append(distH(offset)); should solve that problem. Share this post Link to post Share on other sites
resonanz 0 Posted August 26, 2015 You are right! Sorry about that! The problem is that GA_ROHandleFA is a handle for an array not a float like in your example. I did check if the handle is valid and it is but as soon as I try to get the array from the attribute with distH(offset) I get the following error message: "error C2064: term does not evaluate to a function taking 1 arguments". The thing is that I have no idea what other argument(s) I should use instead. Share this post Link to post Share on other sites
MrScienceOfficer 53 Posted August 26, 2015 Oh okay, yea that makes sense. UT_Fpreal32Array distances; distH.get(offset, distances); Share this post Link to post Share on other sites
resonanz 0 Posted August 26, 2015 Perfect that´s it! Thanks a lot! Share this post Link to post Share on other sites