Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 28 files). Show all
Unified · Split
| @@ -100,12 +100,17 @@ QUuid EntityScriptingInterface::addEntity(const EntityItemProperties& properties · 99 unmodified lines | ||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identity) { |
| 103 | − EntityItemProperties results; | |
| 103 | + QScriptValue allProperties; | |
| 104 | + return getEntityProperties(identity, allProperties); | |
| 105 | +} | |
| 106 | + | |
| 107 | +EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identity, QScriptValue desiredProperties) { | |
| 108 | + EntityItemProperties results; | |
| 104 | 109 | if (_entityTree) { |
| 105 | 110 | _entityTree->withReadLock([&] { |
| 106 | 111 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(identity)); |
| 107 | 112 | if (entity) { |
| 108 | − results = entity->getProperties(); | |
| 113 | + results = entity->getProperties(desiredProperties); | |
| 109 | 114 | |
| 110 | 115 | // TODO: improve sitting points and naturalDimensions in the future, |
| 111 | 116 | // for now we've included the old sitting points model behavior for entity types that are models |