diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 8820b871f9..5b87eff476 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -4027,11 +4027,13 @@ void Application::calibrateEyeTracker5Points() { } #endif -bool Application::exportEntities(const QString& filename, const QVector& entityIDs, const glm::vec3* givenOffset) { +bool Application::exportEntities(const QString& filename, + const QVector& entityIDs, + const glm::vec3* givenOffset) { QHash entities; - auto accountManager = DependencyManager::get(); - auto mySessionID = accountManager->getSessionID(); + auto nodeList = DependencyManager::get(); + const QUuid myAvatarID = nodeList->getSessionUUID(); auto entityTree = getEntities()->getTree(); auto exportTree = std::make_shared(); @@ -4048,7 +4050,7 @@ bool Application::exportEntities(const QString& filename, const QVectorgetParentID(); - bool parentIsAvatar = (parentID == AVATAR_SELF_ID || parentID == mySessionID); + bool parentIsAvatar = (parentID == AVATAR_SELF_ID || parentID == myAvatarID); if (!parentIsAvatar && (parentID.isInvalidID() || !entityIDs.contains(parentID) || !entityTree->findEntityByEntityItemID(parentID))) { @@ -4073,7 +4075,7 @@ bool Application::exportEntities(const QString& filename, const QVectorgetProperties(); EntityItemID parentID = properties.getParentID(); - bool parentIsAvatar = (parentID == AVATAR_SELF_ID || parentID == mySessionID); + bool parentIsAvatar = (parentID == AVATAR_SELF_ID || parentID == myAvatarID); if (parentIsAvatar) { properties.setParentID(AVATAR_SELF_ID); } else {