Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 348 files). Show all
Unified · Split
| @@ -47,6 +47,8 @@ EntityScriptingInterface::EntityScriptingInterface(bool bidOnSimulationOwnership · 46 unmodified lines | ||
| 47 | 47 | connect(nodeList.data(), &NodeList::isAllowedEditorChanged, this, &EntityScriptingInterface::canAdjustLocksChanged); |
| 48 | 48 | connect(nodeList.data(), &NodeList::canRezChanged, this, &EntityScriptingInterface::canRezChanged); |
| 49 | 49 | connect(nodeList.data(), &NodeList::canRezTmpChanged, this, &EntityScriptingInterface::canRezTmpChanged); |
| 50 | + connect(nodeList.data(), &NodeList::canRezCertifiedChanged, this, &EntityScriptingInterface::canRezCertifiedChanged); | |
| 51 | + connect(nodeList.data(), &NodeList::canRezTmpCertifiedChanged, this, &EntityScriptingInterface::canRezTmpCertifiedChanged); | |
| 50 | 52 | connect(nodeList.data(), &NodeList::canWriteAssetsChanged, this, &EntityScriptingInterface::canWriteAssetsChanged); |
| 51 | 53 | } |
| 52 | 54 | |
| @@ -76,6 +78,16 @@ bool EntityScriptingInterface::canRezTmp() { · 23 unmodified lines | ||
| 76 | 78 | return nodeList->getThisNodeCanRezTmp(); |
| 77 | 79 | } |
| 78 | 80 | |
| 81 | +bool EntityScriptingInterface::canRezCertified() { | |
| 82 | + auto nodeList = DependencyManager::get<NodeList>(); | |
| 83 | + return nodeList->getThisNodeCanRezCertified(); | |
| 84 | +} | |
| 85 | + | |
| 86 | +bool EntityScriptingInterface::canRezTmpCertified() { | |
| 87 | + auto nodeList = DependencyManager::get<NodeList>(); | |
| 88 | + return nodeList->getThisNodeCanRezTmpCertified(); | |
| 89 | +} | |
| 90 | + | |
| 79 | 91 | bool EntityScriptingInterface::canWriteAssets() { |
| 80 | 92 | auto nodeList = DependencyManager::get<NodeList>(); |
| 81 | 93 | return nodeList->getThisNodeCanWriteAssets(); |
| @@ -659,22 +671,22 @@ QVector<QUuid> EntityScriptingInterface::findEntitiesInFrustum(QVariantMap frust · 577 unmodified lines | ||
| 659 | 671 | } |
| 660 | 672 | |
| 661 | 673 | QVector<QUuid> EntityScriptingInterface::findEntitiesByType(const QString entityType, const glm::vec3& center, float radius) const { |
| 662 | − EntityTypes::EntityType type = EntityTypes::getEntityTypeFromName(entityType); | |
| 663 | − | |
| 664 | − QVector<QUuid> result; | |
| 665 | − if (_entityTree) { | |
| 666 | − QVector<EntityItemPointer> entities; | |
| 667 | − _entityTree->withReadLock([&] { | |
| 668 | − _entityTree->findEntities(center, radius, entities); | |
| 669 | − }); | |
| 670 | − | |
| 671 | − foreach(EntityItemPointer entity, entities) { | |
| 672 | − if (entity->getType() == type) { | |
| 673 | − result << entity->getEntityItemID(); | |
| 674 | − } | |
| 675 | − } | |
| 676 | − } | |
| 677 | − return result; | |
| 674 | + EntityTypes::EntityType type = EntityTypes::getEntityTypeFromName(entityType); | |
| 675 | + | |
| 676 | + QVector<QUuid> result; | |
| 677 | + if (_entityTree) { | |
| 678 | + QVector<EntityItemPointer> entities; | |
| 679 | + _entityTree->withReadLock([&] { | |
| 680 | + _entityTree->findEntities(center, radius, entities); | |
| 681 | + }); | |
| 682 | + | |
| 683 | + foreach(EntityItemPointer entity, entities) { | |
| 684 | + if (entity->getType() == type) { | |
| 685 | + result << entity->getEntityItemID(); | |
| 686 | + } | |
| 687 | + } | |
| 688 | + } | |
| 689 | + return result; | |
| 678 | 690 | } |
| 679 | 691 | |
| 680 | 692 | RayToEntityIntersectionResult EntityScriptingInterface::findRayIntersection(const PickRay& ray, bool precisionPicking, |