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 | EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identity) { | 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 | if (_entityTree) { | 109 | if (_entityTree) { |
| 105 | _entityTree->withReadLock([&] { | 110 | _entityTree->withReadLock([&] { |
| 106 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(identity)); | 111 | EntityItemPointer entity = _entityTree->findEntityByEntityItemID(EntityItemID(identity)); |
| 107 | if (entity) { | 112 | if (entity) { |
| 108 | results = entity->getProperties(); | 113 | results = entity->getProperties(desiredProperties); |
| 109 | 114 | ||
| 110 | // TODO: improve sitting points and naturalDimensions in the future, | 115 | // TODO: improve sitting points and naturalDimensions in the future, |
| 111 | // for now we've included the old sitting points model behavior for entity types that are models | 116 | // for now we've included the old sitting points model behavior for entity types that are models |