fix mesh file naming
This commit is contained in:
parent
7f444c8c96
commit
66d96ac708
1 changed files with 7 additions and 2 deletions
|
@ -248,9 +248,13 @@ TXshSimpleLevel *createMeshLevel(TXshLevel *texturesLevel) {
|
||||||
codedOrigPath = TFilePath(
|
codedOrigPath = TFilePath(
|
||||||
"+drawings/a"); // parent directory. Store them in "+drawings".
|
"+drawings/a"); // parent directory. Store them in "+drawings".
|
||||||
|
|
||||||
|
// temporarily disable underscore in order to get proper file path when the
|
||||||
|
// level name includes underscore like "sub_1"
|
||||||
|
TFilePath::setUnderscoreFormatAllowed(false);
|
||||||
codedOrigPath = codedDstPath =
|
codedOrigPath = codedDstPath =
|
||||||
codedOrigPath.withName(pathName).withType("mesh").withFrame(
|
codedOrigPath.withName(pathName).withType("mesh").withFrame(
|
||||||
TFrameId::EMPTY_FRAME);
|
TFrameId::EMPTY_FRAME);
|
||||||
|
TFilePath::setUnderscoreFormatAllowed(true);
|
||||||
|
|
||||||
origPath = dstPath = scene->decodeFilePath(codedOrigPath);
|
origPath = dstPath = scene->decodeFilePath(codedOrigPath);
|
||||||
|
|
||||||
|
@ -260,9 +264,10 @@ TXshSimpleLevel *createMeshLevel(TXshLevel *texturesLevel) {
|
||||||
while (TSystem::doesExistFileOrLevel(dstPath) ||
|
while (TSystem::doesExistFileOrLevel(dstPath) ||
|
||||||
scene->getLevelSet()->hasLevel(*scene, codedDstPath)) {
|
scene->getLevelSet()->hasLevel(*scene, codedDstPath)) {
|
||||||
pathName = nameBuilder->getNext();
|
pathName = nameBuilder->getNext();
|
||||||
|
TFilePath::setUnderscoreFormatAllowed(false);
|
||||||
codedDstPath = origPath.withName(pathName).withType("mesh").withFrame(
|
codedDstPath = origPath.withName(pathName).withType("mesh").withFrame(
|
||||||
TFrameId::EMPTY_FRAME);
|
TFrameId::EMPTY_FRAME);
|
||||||
|
TFilePath::setUnderscoreFormatAllowed(true);
|
||||||
dstPath = scene->decodeFilePath(codedDstPath);
|
dstPath = scene->decodeFilePath(codedDstPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1312,7 +1317,7 @@ public:
|
||||||
|
|
||||||
void execute() override {
|
void execute() override {
|
||||||
static MeshifyPopup *thePopup = 0;
|
static MeshifyPopup *thePopup = 0;
|
||||||
if (!thePopup) thePopup = new MeshifyPopup;
|
if (!thePopup) thePopup = new MeshifyPopup;
|
||||||
|
|
||||||
thePopup->raise();
|
thePopup->raise();
|
||||||
thePopup->show();
|
thePopup->show();
|
||||||
|
|
Loading…
Reference in a new issue