diff --git a/src/osgPlugins/p3d/ReaderWriterP3D.cpp b/src/osgPlugins/p3d/ReaderWriterP3D.cpp index 7d2680f12..9bb1ab5aa 100644 --- a/src/osgPlugins/p3d/ReaderWriterP3D.cpp +++ b/src/osgPlugins/p3d/ReaderWriterP3D.cpp @@ -880,28 +880,48 @@ osg::TransferFunction1D* ReaderWriterP3DXML::readTransferFunctionFile(const std: std::string foundFile = osgDB::findDataFile(filename); if (foundFile.empty()) { - std::cout<<"Error: could not find transfer function file : "<> value >> red >> green >> blue >> alpha; - if (fin) + char readline[4096]; + *readline = 0; + fin.getline(readline, sizeof(readline)); + + if (*readline!=0) { - std::cout<<"value = "<> value >> red >> green >> blue >> alpha; + + *readline = 0; + str.getline(readline, sizeof(readline)); + + char* comment = readline; + while(*comment==' ' || *comment=='\t' ) ++comment; + + if (*comment!=0) + { + OSG_NOTICE<<"value = "<