Showing the changes to interface/src/AvatarBookmarks.cpp (1 of 2 files). Show all
Unified · Split
| @@ -25,6 +25,7 @@ · 24 unmodified lines | ||
| 25 | 25 | #include <avatar/AvatarManager.h> |
| 26 | 26 | #include <EntityItemID.h> |
| 27 | 27 | #include <EntityTree.h> |
| 28 | +#include <ModelEntityItem.h> | |
| 28 | 29 | #include <PhysicalEntitySimulation.h> |
| 29 | 30 | #include <EntityEditPacketSender.h> |
| 30 | 31 | #include <VariantMapToScriptValue.h> |
| @@ -35,7 +36,7 @@ · 4 unmodified lines | ||
| 35 | 36 | #include "QVariantGLM.h" |
| 36 | 37 | |
| 37 | 38 | #include <QtQuick/QQuickWindow> |
| 38 | − | |
| 39 | +#include <memory> | |
| 39 | 40 | |
| 40 | 41 | void addAvatarEntities(const QVariantList& avatarEntities) { |
| 41 | 42 | auto nodeList = DependencyManager::get<NodeList>(); |
| @@ -145,8 +146,8 @@ void AvatarBookmarks::removeBookmark(const QString& bookmarkName) { · 103 unmodified lines | ||
| 145 | 146 | } |
| 146 | 147 | |
| 147 | 148 | bool isWearableEntity(const EntityItemPointer& entity) { |
| 148 | − return entity->isVisible() && entity->getParentJointIndex() != INVALID_JOINT_INDEX && | |
| 149 | − (entity->getParentID() == DependencyManager::get<NodeList>()->getSessionUUID() || entity->getParentID() == DependencyManager::get<AvatarManager>()->getMyAvatar()->getSelfID()); | |
| 149 | + return entity->isVisible() && (entity->getParentJointIndex() != INVALID_JOINT_INDEX || (entity->getType() == EntityTypes::Model && (std::static_pointer_cast<ModelEntityItem>(entity))->getRelayParentJoints())) | |
| 150 | + && (entity->getParentID() == DependencyManager::get<NodeList>()->getSessionUUID() || entity->getParentID() == DependencyManager::get<AvatarManager>()->getMyAvatar()->getSelfID()); | |
| 150 | 151 | } |
| 151 | 152 | |
| 152 | 153 | void AvatarBookmarks::updateAvatarEntities(const QVariantList &avatarEntities) { |