Showing the changes to interface/src/ModelPackager.cpp (1 of 55 files). Show all
Unified · Split
| @@ -135,6 +135,23 @@ bool ModelPackager::editProperties() { · 134 unmodified lines | |||
| 135 | return false; | 135 | return false; |
| 136 | } | 136 | } |
| 137 | _mapping = properties.getMapping(); | 137 | _mapping = properties.getMapping(); |
| 138 | |||
| 139 | // Make sure that a mapping for the root joint has been specified | ||
| 140 | QVariantHash joints = _mapping.value(JOINT_FIELD).toHash(); | ||
| 141 | if (!joints.contains("jointRoot")) { | ||
| 142 | qWarning() << QString("%1 root joint not configured for skeleton.").arg(_modelFile.fileName()); | ||
| 143 | |||
| 144 | QString message = "Your did not configure a root joint for your skeleton model.\n\nThe upload will be canceled."; | ||
| 145 | QMessageBox msgBox; | ||
| 146 | msgBox.setWindowTitle("Model Upload"); | ||
| 147 | msgBox.setText(message); | ||
| 148 | msgBox.setStandardButtons(QMessageBox::Ok); | ||
| 149 | msgBox.setIcon(QMessageBox::Warning); | ||
| 150 | msgBox.exec(); | ||
| 151 | |||
| 152 | return false; | ||
| 153 | } | ||
| 154 | |||
| 138 | return true; | 155 | return true; |
| 139 | } | 156 | } |
| 140 | 157 | ||