History

Automatically switch to default model if avatar model is skeletonless

David Rowe committed 11 years ago

Commit aad3f1d1 parent 30b77d45 files · +33 −2Browse files

Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all

Unified · Split

interface/src/Application.cpp+19−0
@@ -490,6 +490,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 489 unmodified lines
490 connect(nodeList.data(), SIGNAL(dataReceived(const quint8, const int)),490 connect(nodeList.data(), SIGNAL(dataReceived(const quint8, const int)),
491 bandwidthRecorder.data(), SLOT(updateInboundData(const quint8, const int)));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 // check first run...496 // check first run...
494 if (_firstRun.get()) {497 if (_firstRun.get()) {
495 qDebug() << "This is a first run...";498 qDebug() << "This is a first run...";
@@ -4006,3 +4009,19 @@ void Application::notifyPacketVersionMismatch() { · 3510 unmodified lines
4006 msgBox.exec();4009 msgBox.exec();
4007 }4010 }
4008}4011}
4012
4013void 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}

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