diff --git a/src/osgPlugins/OpenFlight/GeometryRecords.cpp b/src/osgPlugins/OpenFlight/GeometryRecords.cpp index 575d3faeb..8006d0c3c 100644 --- a/src/osgPlugins/OpenFlight/GeometryRecords.cpp +++ b/src/osgPlugins/OpenFlight/GeometryRecords.cpp @@ -362,7 +362,7 @@ protected: int materialIndex = in.readInt16(-1); int16 surface = in.readInt16(); int16 feature = in.readInt16(); - /*int32 IRMaterial =*/ in.readInt32(-1); + int32 IRMaterial = in.readInt32(); _transparency = in.readUInt16(0); // version > 13 /*uint8 influenceLOD =*/ in.readUInt8(); @@ -457,6 +457,12 @@ protected: _geometry->setUserValue("", IRColor); } + // IR Material ID (IRM) + if (document.getPreserveNonOsgAttrsAsUserData() && 0 != IRMaterial) + { + _geometry->setUserValue("", IRMaterial); + } + // surface (SMC) if (document.getPreserveNonOsgAttrsAsUserData() && 0 != surface) {