History

Checking model name is present in the .fst file

Atlante45 committed 12 years ago

Commit 039450a1 parent 8ad7c3b1 file · +11 −0Browse files

Showing the changes to interface/src/ModelUploader.cpp (1 of 1 file). Show all

Unified · Split

interface/src/ModelUploader.cpp+11−0
@@ -65,6 +65,7 @@ bool ModelUploader::zip() { · 64 unmodified lines
6565 // If the user canceled we return.
6666 return false;
6767 }
68+ bool _nameIsPresent = false;
6869 QString texDir;
6970 QString fbxFile;
7071
@@ -103,6 +104,7 @@ bool ModelUploader::zip() { · 32 unmodified lines
103104 textPart.setBody(line[1].toUtf8());
104105 _dataMultiPart->append(textPart);
105106 _url = S3_URL + ((_isHead)? "/models/heads/" : "/models/skeletons/") + line[1].toUtf8() + ".fst";
107+ _nameIsPresent = true;
106108 } else if (line[0] == FILENAME_FIELD) {
107109 fbxFile = QFileInfo(fst).path() + "/" + line[1];
108110 QFileInfo fbxInfo(fbxFile);
@@ -159,6 +161,15 @@ bool ModelUploader::zip() { · 50 unmodified lines
159161 }
160162 _dataMultiPart->append(textPart);
161163
164+ if (!_nameIsPresent) {
165+ QMessageBox::warning(NULL,
166+ QString("ModelUploader::zip()"),
167+ QString("Model name is missing in the .fst file."),
168+ QMessageBox::Ok);
169+ qDebug() << "[Warning] " << QString("Model name is missing in the .fst file.");
170+ return false;
171+ }
172+
162173 _readyToSend = true;
163174 return true;
164175 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t