You're right, the OpenFlight importer doesn't preserve the record type in the UserData.
You'll need to modify the OpenFlight importer to store the necessary information. I'd suggest using the Node DescriptionList and storing the record as a simple std::string, much less complicated than trying to use UserData for this task. If you modify the code in such a way that this is done based on a ReaderWriter::Option, you could commit your change back to OSG. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Peter Amstutz Sent: Friday, April 24, 2009 10:08 AM To: OpenSceneGraph Users Subject: [osg-users] determine record type from OpenFlight files? I am loading an OpenFlight file using osgDB and I need to do some additional processing based on the specific record types, specifically terrain and roads. From looking at the OpenFlight loader in osg 2.6, it seems that this information is read by OSG (there is a flag indicating terrain and roads have a special record type) but I cannot figure out how to access this information from the scene graph that is actually returned by osgDB::readNodeFile() -- it does not appear that this information is set in the node's UserData. Does anyone have any suggestions on how to get this information? Thanks, Peter _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

