diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index f1be8611e1..782458894d 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -219,9 +219,11 @@ void RenderableModelEntityItem::render(RenderArgs* args) { if (hasModel()) { if (_model) { - if (getModelURL() != _model->getURL().toString()) { - qDebug() << "Updating model URL: " << getModelURL(); - _model->setURL(getModelURL()); + // check if the URL has changed + auto& currentURL = getParsedModelURL(); + if (currentURL != _model->getURL()) { + qDebug().noquote() << "Updating model URL: " << currentURL.toDisplayString(); + _model->setURL(currentURL); } render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene(); diff --git a/libraries/entities/src/ModelEntityItem.h b/libraries/entities/src/ModelEntityItem.h index e8ffcab3e7..fb41ac4b77 100644 --- a/libraries/entities/src/ModelEntityItem.h +++ b/libraries/entities/src/ModelEntityItem.h @@ -63,6 +63,7 @@ public: static const QString DEFAULT_MODEL_URL; const QString& getModelURL() const { return _modelURL; } + const QUrl& getParsedModelURL() const { return _parsedModelURL; } static const QString DEFAULT_COMPOUND_SHAPE_URL; const QString& getCompoundShapeURL() const { return _compoundShapeURL; } @@ -75,7 +76,7 @@ public: } // model related properties - void setModelURL(const QString& url) { _modelURL = url; } + void setModelURL(const QString& url) { _modelURL = url; _parsedModelURL = QUrl(url); } virtual void setCompoundShapeURL(const QString& url); @@ -134,6 +135,7 @@ protected: rgbColor _color; QString _modelURL; + QUrl _parsedModelURL; QString _compoundShapeURL; AnimationPropertyGroup _animationProperties;