Showing the changes to interface/src/ModelUploader.cpp (1 of 1 file). Show all
Unified · Split
| @@ -65,6 +65,7 @@ bool ModelUploader::zip() { · 64 unmodified lines | ||
| 65 | 65 | // If the user canceled we return. |
| 66 | 66 | return false; |
| 67 | 67 | } |
| 68 | + bool _nameIsPresent = false; | |
| 68 | 69 | QString texDir; |
| 69 | 70 | QString fbxFile; |
| 70 | 71 | |
| @@ -103,6 +104,7 @@ bool ModelUploader::zip() { · 32 unmodified lines | ||
| 103 | 104 | textPart.setBody(line[1].toUtf8()); |
| 104 | 105 | _dataMultiPart->append(textPart); |
| 105 | 106 | _url = S3_URL + ((_isHead)? "/models/heads/" : "/models/skeletons/") + line[1].toUtf8() + ".fst"; |
| 107 | + _nameIsPresent = true; | |
| 106 | 108 | } else if (line[0] == FILENAME_FIELD) { |
| 107 | 109 | fbxFile = QFileInfo(fst).path() + "/" + line[1]; |
| 108 | 110 | QFileInfo fbxInfo(fbxFile); |
| @@ -159,6 +161,15 @@ bool ModelUploader::zip() { · 50 unmodified lines | ||
| 159 | 161 | } |
| 160 | 162 | _dataMultiPart->append(textPart); |
| 161 | 163 | |
| 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 | + | |
| 162 | 173 | _readyToSend = true; |
| 163 | 174 | return true; |
| 164 | 175 | } |