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