doc Posted June 25, 2007 Share Posted June 25, 2007 Hi, I was wondering if somebody might be able to give me some pointers on how to delete an attribute and it's custom varaible mapping? Many thanks L Quote Link to comment Share on other sites More sharing options...
sibarrick Posted June 25, 2007 Share Posted June 25, 2007 Not sure about the custom variable mappings but you can delete attributes with the destroy methods eg gdp->destroyPointAttrib("Cd",sizeof(float)*3,GB_ATTRIB_FLOAT); Quote Link to comment Share on other sites More sharing options...
doc Posted June 25, 2007 Author Share Posted June 25, 2007 Not sure about the custom variable mappings but you can delete attributes with the destroy methodseg gdp->destroyPointAttrib("Cd",sizeof(float)*3,GB_ATTRIB_FLOAT); Thanks Simon, One follow up question, if you reqiure the size and type of attribute in order to delete it, is there a way to determine what the size and type is of an incoming attribute? I'm hoping to get similar behaviour to the delete sop's "Delete Attributes" parameter I'm digging through doxygen at the moment, but I'm coming up a bit short. findAttrib() maybe? Many thanks L Quote Link to comment Share on other sites More sharing options...
sibarrick Posted June 26, 2007 Share Posted June 26, 2007 The only time I haven't know the size before hand is when dealing with attribute pairs, in that case there is another destroy function which doesn't need the size just the name. gdp->destroyPtIndexPairAttribute("warpCaptp"); If that doesn't help I'm afraid I don't know of a way. Quote Link to comment Share on other sites More sharing options...
doc Posted June 27, 2007 Author Share Posted June 27, 2007 Figured out how to get the type and size of an attribute. Thought I'd share so everyone can benifit: GB_Attribute *attrib = gdp->pointAttribs().find(parmVal); if(attrib!=0){ int offset = gdp->pointAttribs().getOffset(attrib); GB_AttribType type = attrib->getType(); int size = attrib->getSize(); L 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.