Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 110 files). Show all
Unified · Split
| @@ -70,9 +70,10 @@ EntityItemProperties EntityScriptingInterface::getEntityProperties(EntityItemID · 69 unmodified lines | ||
| 70 | 70 | } |
| 71 | 71 | if (_entityTree) { |
| 72 | 72 | _entityTree->lockForRead(); |
| 73 | − const EntityItem* model = _entityTree->findEntityByID(identity.id, true); | |
| 74 | − if (model) { | |
| 75 | − results = model->getProperties(); | |
| 73 | + EntityItem* entity = const_cast<EntityItem*>(_entityTree->findEntityByID(identity.id, true)); | |
| 74 | + if (entity) { | |
| 75 | + entity->setSittingPoints(_entityTree->getGeometryForEntity(*entity)->sittingPoints); | |
| 76 | + results = entity->getProperties(); | |
| 76 | 77 | } else { |
| 77 | 78 | results.setIsUnknownID(); |
| 78 | 79 | } |