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

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