From 1467a9d2ebb82485911333c130f9fe94802ef00f Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 10 Dec 2015 11:17:40 -0800 Subject: [PATCH] handle initial simulation of _model --- .../src/RenderableModelEntityItem.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index 3709c0b9ad..3dcb86fc50 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -251,7 +251,7 @@ void RenderableModelEntityItem::render(RenderArgs* args) { // check if the URL has changed auto& currentURL = getParsedModelURL(); if (currentURL != _model->getURL()) { - qDebug().noquote() << "Updating model URL: " << currentURL.toDisplayString(); + qCDebug(entitiesrenderer).noquote() << "Updating model URL: " << currentURL.toDisplayString(); _model->setURL(currentURL); } @@ -378,12 +378,6 @@ Model* RenderableModelEntityItem::getModel(EntityTreeRenderer* renderer) { } else { // we already have the model we want... result = _model; } - - if (_model && _needsInitialSimulation) { - PerformanceTimer perfTimer("_model->simulate"); - _model->simulate(0.0f); - } - _needsInitialSimulation = false; } else { // if our desired URL is empty, we may need to delete our existing model if (_model) { _myRenderer->releaseModel(_model); @@ -463,7 +457,9 @@ bool RenderableModelEntityItem::isReadyToComputeShape() { if (_needsInitialSimulation) { // the _model's offset will be wrong until _needsInitialSimulation is false - return false; + PerformanceTimer perfTimer("_model->simulate"); + _model->simulate(0.0f); + _needsInitialSimulation = false; } assert(!_model->getCollisionURL().isEmpty());