On Thu, Jan 13, 2011 at 13:53, Christopher Sean Morrison <[email protected]> wrote: > On Jan 12, 2011, at 7:43 AM, Tom Browder wrote: ... > We had a discussion some time ago about air codes, region IDs and such >> and I don't remember what the final resolution was, but I notice >> "default" attributes in the output files from g2asc on old TGMs show >> something different than red on the same TGM in .g form. In >> particular, in the old TGMs air is zero by default. In asc form {air} >> doesn't show at all for those old TGMs without an air code explicitly >> set but edcodes still shows that value as zero while red shows null >> for air. >> >> By referring to the asc form (and confirmed by red) It looks like the >> current "standard" attributes (those shown by attr) are: >> >> region >> region_id >> material_id >> los > > This list seems incomplete. A few more that immediately come to mind > are: > > air > color > oshader > inherit
Well, apparently attr only shows the ones that have been defined while red shows them all--that's what confused me at first. Maybe attr could show the NULL ones also since they exist. > Those are listed in db5_is_standard_attribute() in src/librt/ > db5_types.c along with the companion db5_standardize_attribute() > which takes care of the slew of aliases several attributes have > (e.g., material_id, MATERIAL_ID, GIFTmater, GIFT_MATERIAL, and mat > all refer to the same thing). Good, I'll start using that instead of... >> I guess for old TGMs I can still interrogate the hard-wired struct >> region variables: > > True, but probably a brittle approach (at least for v5 files). the above. > What I'd like to see is *ahem* namespaces for attributes even if in > naming convention only, so that we can put them to greater use > without developers worrying about their attribute name getting > stomped on. Something like cad::material_id. Roger! That's what prompted my feature request as I started using the attrs more. I like 'std' as I suggested--just a thought. > There'd obviously need to be an API established for setting/getting > attributes so that namespaces get respected correctly as well as a > way to upgrade attribute names. Yes sir! Cheers! -Tom ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ BRL-CAD Developer mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-devel
