mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-16 14:12:35 +02:00
Checking model name is present in the .fst file
This commit is contained in:
parent
8ad7c3b239
commit
039450aeec
1 changed files with 11 additions and 0 deletions
|
@ -65,6 +65,7 @@ bool ModelUploader::zip() {
|
|||
// If the user canceled we return.
|
||||
return false;
|
||||
}
|
||||
bool _nameIsPresent = false;
|
||||
QString texDir;
|
||||
QString fbxFile;
|
||||
|
||||
|
@ -103,6 +104,7 @@ bool ModelUploader::zip() {
|
|||
textPart.setBody(line[1].toUtf8());
|
||||
_dataMultiPart->append(textPart);
|
||||
_url = S3_URL + ((_isHead)? "/models/heads/" : "/models/skeletons/") + line[1].toUtf8() + ".fst";
|
||||
_nameIsPresent = true;
|
||||
} else if (line[0] == FILENAME_FIELD) {
|
||||
fbxFile = QFileInfo(fst).path() + "/" + line[1];
|
||||
QFileInfo fbxInfo(fbxFile);
|
||||
|
@ -159,6 +161,15 @@ bool ModelUploader::zip() {
|
|||
}
|
||||
_dataMultiPart->append(textPart);
|
||||
|
||||
if (!_nameIsPresent) {
|
||||
QMessageBox::warning(NULL,
|
||||
QString("ModelUploader::zip()"),
|
||||
QString("Model name is missing in the .fst file."),
|
||||
QMessageBox::Ok);
|
||||
qDebug() << "[Warning] " << QString("Model name is missing in the .fst file.");
|
||||
return false;
|
||||
}
|
||||
|
||||
_readyToSend = true;
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue