Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -490,6 +490,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 489 unmodified lines | ||
| 490 | 490 | connect(nodeList.data(), SIGNAL(dataReceived(const quint8, const int)), |
| 491 | 491 | bandwidthRecorder.data(), SLOT(updateInboundData(const quint8, const int))); |
| 492 | 492 | |
| 493 | + connect(&_myAvatar->getSkeletonModel(), &SkeletonModel::skeletonLoaded, | |
| 494 | + this, &Application::checkSkeleton, Qt::QueuedConnection); | |
| 495 | + | |
| 493 | 496 | // check first run... |
| 494 | 497 | if (_firstRun.get()) { |
| 495 | 498 | qDebug() << "This is a first run..."; |
| @@ -4006,3 +4009,19 @@ void Application::notifyPacketVersionMismatch() { · 3510 unmodified lines | ||
| 4006 | 4009 | msgBox.exec(); |
| 4007 | 4010 | } |
| 4008 | 4011 | } |
| 4012 | + | |
| 4013 | +void Application::checkSkeleton() { | |
| 4014 | + if (_myAvatar->getSkeletonModel().isActive() && !_myAvatar->getSkeletonModel().hasSkeleton()) { | |
| 4015 | + qDebug() << "MyAvatar model has no skeleton"; | |
| 4016 | + | |
| 4017 | + QString message = "Your selected avatar body has no skeleton.\n\nThe default body will be loaded..."; | |
| 4018 | + QMessageBox msgBox; | |
| 4019 | + msgBox.setText(message); | |
| 4020 | + msgBox.setStandardButtons(QMessageBox::Ok); | |
| 4021 | + msgBox.setIcon(QMessageBox::Warning); | |
| 4022 | + msgBox.exec(); | |
| 4023 | + | |
| 4024 | + _myAvatar->setSkeletonModelURL(DEFAULT_BODY_MODEL_URL); | |
| 4025 | + _myAvatar->sendIdentityPacket(); | |
| 4026 | + } | |
| 4027 | +} | |