mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:28:37 +02:00
commit
356dbbec72
1 changed files with 17 additions and 19 deletions
|
@ -178,27 +178,9 @@ bool ModelUploader::zip() {
|
||||||
QByteArray fbxContents = fbx.readAll();
|
QByteArray fbxContents = fbx.readAll();
|
||||||
FBXGeometry geometry = readFBX(fbxContents, QVariantHash());
|
FBXGeometry geometry = readFBX(fbxContents, QVariantHash());
|
||||||
|
|
||||||
#if 0 /// Temporarily remove this check until CtrlAltDavid can come up with a fix.
|
|
||||||
// Make sure that a skeleton model has a skeleton
|
|
||||||
if (_modelType == SKELETON_MODEL) {
|
|
||||||
if (geometry.rootJointIndex == -1) {
|
|
||||||
|
|
||||||
QString message = "Your selected skeleton model has no skeleton.\n\nThe upload will be canceled.";
|
|
||||||
QMessageBox msgBox;
|
|
||||||
msgBox.setWindowTitle("Model Upload");
|
|
||||||
msgBox.setText(message);
|
|
||||||
msgBox.setStandardButtons(QMessageBox::Ok);
|
|
||||||
msgBox.setIcon(QMessageBox::Warning);
|
|
||||||
msgBox.exec();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// make sure we have some basic mappings
|
// make sure we have some basic mappings
|
||||||
populateBasicMapping(mapping, filename, geometry);
|
populateBasicMapping(mapping, filename, geometry);
|
||||||
|
|
||||||
// open the dialog to configure the rest
|
// open the dialog to configure the rest
|
||||||
ModelPropertiesDialog properties(_modelType, mapping, basePath, geometry);
|
ModelPropertiesDialog properties(_modelType, mapping, basePath, geometry);
|
||||||
if (properties.exec() == QDialog::Rejected) {
|
if (properties.exec() == QDialog::Rejected) {
|
||||||
|
@ -206,6 +188,22 @@ bool ModelUploader::zip() {
|
||||||
}
|
}
|
||||||
mapping = properties.getMapping();
|
mapping = properties.getMapping();
|
||||||
|
|
||||||
|
// Make sure that a mapping for the root joint has been specified
|
||||||
|
QVariantHash joints = mapping.value(JOINT_FIELD).toHash();
|
||||||
|
if (!joints.contains("jointRoot")) {
|
||||||
|
qDebug() << QString("[Warning] %1 root joint not configured for skeleton.").arg(filename);
|
||||||
|
|
||||||
|
QString message = "Your did not configure a root joint for your skeleton model.\n\nThe upload will be canceled.";
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle("Model Upload");
|
||||||
|
msgBox.setText(message);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setIcon(QMessageBox::Warning);
|
||||||
|
msgBox.exec();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QByteArray nameField = mapping.value(NAME_FIELD).toByteArray();
|
QByteArray nameField = mapping.value(NAME_FIELD).toByteArray();
|
||||||
QString urlBase;
|
QString urlBase;
|
||||||
if (!nameField.isEmpty()) {
|
if (!nameField.isEmpty()) {
|
||||||
|
|
Loading…
Reference in a new issue