@@ -248,9 +248,13 @@ TXshSimpleLevel *createMeshLevel(TXshLevel *texturesLevel) {
248248 codedOrigPath = TFilePath (
249249 " +drawings/a" ); // parent directory. Store them in "+drawings".
250250
251+ // temporarily disable underscore in order to get proper file path when the
252+ // level name includes underscore like "sub_1"
253+ TFilePath::setUnderscoreFormatAllowed (false );
251254 codedOrigPath = codedDstPath =
252255 codedOrigPath.withName (pathName).withType (" mesh" ).withFrame (
253256 TFrameId::EMPTY_FRAME);
257+ TFilePath::setUnderscoreFormatAllowed (true );
254258
255259 origPath = dstPath = scene->decodeFilePath (codedOrigPath);
256260
@@ -260,9 +264,10 @@ TXshSimpleLevel *createMeshLevel(TXshLevel *texturesLevel) {
260264 while (TSystem::doesExistFileOrLevel (dstPath) ||
261265 scene->getLevelSet ()->hasLevel (*scene, codedDstPath)) {
262266 pathName = nameBuilder->getNext ();
263-
267+ TFilePath::setUnderscoreFormatAllowed ( false );
264268 codedDstPath = origPath.withName (pathName).withType (" mesh" ).withFrame (
265269 TFrameId::EMPTY_FRAME);
270+ TFilePath::setUnderscoreFormatAllowed (true );
266271 dstPath = scene->decodeFilePath (codedDstPath);
267272 }
268273
@@ -1312,7 +1317,7 @@ class MeshifyCommand final : public MenuItemHandler {
13121317
13131318 void execute () override {
13141319 static MeshifyPopup *thePopup = 0 ;
1315- if (!thePopup) thePopup = new MeshifyPopup;
1320+ if (!thePopup) thePopup = new MeshifyPopup;
13161321
13171322 thePopup->raise ();
13181323 thePopup->show ();
0 commit comments