- Timestamp:
- 11/23/09 12:00:07 (4 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/osgTerrain/ImageLayer.cpp
r8840 r10819 12 12 #include <osgDB/Input> 13 13 #include <osgDB/Output> 14 #include <osgDB/WriteFile> 14 15 #include <osgDB/ParameterOutput> 15 16 … … 65 66 { 66 67 const osgTerrain::ImageLayer& layer = static_cast<const osgTerrain::ImageLayer&>(obj); 68 69 std::string fileName = layer.getFileName(); 67 70 68 if ( !layer.getFileName().empty())71 if (fw.getOutputTextureFiles()) 69 72 { 70 fw.indent()<<"file "<< layer.getFileName() << std::endl; 73 if (fileName.empty()) 74 { 75 fileName = fw.getTextureFileNameForOutput(); 76 } 77 osgDB::writeImageFile(*layer.getImage(), fileName); 78 } 79 if (!fileName.empty()) 80 { 81 fw.indent()<<"file "<< fw.wrapString(fileName) << std::endl; 71 82 } 72 83
