Showing the changes to interface/src/scripting/SelectionScriptingInterface.cpp (1 of 164 files). Show all
Unified · Split
| @@ -155,7 +155,7 @@ void SelectionToSceneHandler::updateSceneFromSelectedList() { · 154 unmodified lines | ||
| 155 | 155 | render::Transaction transaction; |
| 156 | 156 | render::ItemIDs finalList; |
| 157 | 157 | render::ItemID currentID; |
| 158 | − auto entityTree = qApp->getEntities()->getTree(); | |
| 158 | + auto entityTreeRenderer = DependencyManager::get<EntityTreeRenderer>(); | |
| 159 | 159 | auto& overlays = qApp->getOverlays(); |
| 160 | 160 | |
| 161 | 161 | for (QUuid& currentAvatarID : thisList.getAvatarIDs()) { |
| @@ -169,18 +169,10 @@ void SelectionToSceneHandler::updateSceneFromSelectedList() { · 7 unmodified lines | ||
| 169 | 169 | } |
| 170 | 170 | |
| 171 | 171 | for (EntityItemID& currentEntityID : thisList.getEntityIDs()) { |
| 172 | − entityTree->withReadLock([&] { | |
| 173 | − auto entityItem = entityTree->findEntityByEntityItemID(currentEntityID); | |
| 174 | − if (entityItem != NULL) { | |
| 175 | − auto renderableInterface = entityItem->getRenderableInterface(); | |
| 176 | − if (renderableInterface != NULL) { | |
| 177 | − currentID = renderableInterface->getMetaRenderItemID(); | |
| 178 | − if (currentID != render::Item::INVALID_ITEM_ID) { | |
| 179 | − finalList.push_back(currentID); | |
| 180 | − } | |
| 181 | − } | |
| 182 | − } | |
| 183 | − }); | |
| 172 | + currentID = entityTreeRenderer->renderableIdForEntityId(currentEntityID); | |
| 173 | + if (currentID != render::Item::INVALID_ITEM_ID) { | |
| 174 | + finalList.push_back(currentID); | |
| 175 | + } | |
| 184 | 176 | } |
| 185 | 177 | |
| 186 | 178 | for (OverlayID& currentOverlayID : thisList.getOverlayIDs()) { |