I'm starting to get my feet wet a bit, but need some guidance on reading attributes better from a RBD_Packed_Object node from Dops. Basically here I want to receive the point “name” attrib on first packedObject, from a Sop node referencing a dopnet. I'm able to get an output using:
//inside cookMySop(...constSIM_Object*simobj=simobjects(i);// i is a RBD_Packed_Object NodeconstSIM_Geometry*geo=simobj->getGeometry();GU_DetailHandleAutoReadLocksourcegdl(geo->getGeometry());constGU_Detail*simobjgdp=sourcegdl.getGdp();GA_ROHandleSh(simobjgdp,GA_ATTRIB_POINT,"name");constchar*string_value=h.get(impactdata->getPrimitiveNumber(0));std::cout<<string_value<<std::endl;
My question is if there is a better way of retrieving attributes from a RBD_Packed_Object or a cleaner way of accessing a SIM_Objects gdp? I feel like I'm going about getting the GU_Detail wrong.