ClausKleber Posted April 23, 2014 Share Posted April 23, 2014 (edited) Hi, i am trying to write to some attributes from SIM_Data. How can i get a non-const GU_Detail? The attribute reference is always "read only". Can someone give me an advice? Here my code: SIM_GeometryCopy *geo = SIM_DATA_CAST(obj.getNamedSubData(SIM_GEOMETRY_DATANAME), SIM_GeometryCopy); if (geo) { GU_DetailHandle gdh = geo->getGeometry().getWriteableCopy(); const GU_Detail* gdp = gdh.peekDetail(); GEO_AttributeHandle h = gdp->findPointAttribute("hittime"); if (h.isAttributeValid()) { for (GA_Iterator it(gdp->getPointRange()); !it.atEnd(); it.advance()) { const GEO_Point *ppt = gdp->getGEOPoint(it.getOffset()); h.setElement(ppt); h.setF(1.3f); // this has no effect } } } Edited April 24, 2014 by ClausKleber 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.