Changeset 10938
- Timestamp:
- 01/11/10 15:04:55 (3 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/3ds/WriterNodeVisitor.cpp
r10932 r10938 426 426 } 427 427 428 /// Converts an extension to a 3-letters long one equivalent. 429 std::string convertExt(const std::string & path) 430 { 431 std::string ext = osgDB::getFileExtensionIncludingDot(path); 432 if (ext == ".tiff") ext = ".tif"; 433 else if (ext == ".jpeg") ext = ".jpg"; 434 else if (ext == ".jpeg2000" || ext == ".jpg2000") ext = ".jpc"; 435 return osgDB::getNameLessExtension(path) + ext; 436 } 437 428 438 void WriterNodeVisitor::writeMaterials() 429 439 { … … 461 471 path = getPathRelative(_srcDirectory, mat.image->getFileName()); 462 472 } 473 path = convertExt(path); 474 463 475 if(!is3DSpath(path)) { 464 476 path = getUniqueName(path, "", true);
