Showing the changes to libraries/entities/src/EntityScriptingInterface.cpp (1 of 34 files). Show all
Unified · Split
| @@ -296,13 +296,11 @@ EntityItemProperties EntityScriptingInterface::getEntityProperties(QUuid identit · 295 unmodified lines | |||
| 296 | 296 | ||
| 297 | results = entity->getProperties(desiredProperties); | 297 | results = entity->getProperties(desiredProperties); |
| 298 | 298 | ||
| 299 | // TODO: improve sitting points and naturalDimensions in the future, | 299 | // TODO: improve naturalDimensions in the future, |
| 300 | // for now we've included the old sitting points model behavior for entity types that are models | 300 | // for now we've added this hack for setting natural dimensions of models |
| 301 | // we've also added this hack for setting natural dimensions of models | ||
| 302 | if (entity->getType() == EntityTypes::Model) { | 301 | if (entity->getType() == EntityTypes::Model) { |
| 303 | const FBXGeometry* geometry = _entityTree->getGeometryForEntity(entity); | 302 | const FBXGeometry* geometry = _entityTree->getGeometryForEntity(entity); |
| 304 | if (geometry) { | 303 | if (geometry) { |
| 305 | results.setSittingPoints(geometry->sittingPoints); | ||
| 306 | Extents meshExtents = geometry->getUnscaledMeshExtents(); | 304 | Extents meshExtents = geometry->getUnscaledMeshExtents(); |
| 307 | results.setNaturalDimensions(meshExtents.maximum - meshExtents.minimum); | 305 | results.setNaturalDimensions(meshExtents.maximum - meshExtents.minimum); |
| 308 | results.calculateNaturalPosition(meshExtents.minimum, meshExtents.maximum); | 306 | results.calculateNaturalPosition(meshExtents.minimum, meshExtents.maximum); |