mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 05:57:29 +02:00
put the parsed model URL in ModelEntityItem
This commit is contained in:
parent
0d6b919448
commit
5a7b0dd1ad
3 changed files with 7 additions and 8 deletions
|
@ -219,13 +219,11 @@ void RenderableModelEntityItem::render(RenderArgs* args) {
|
||||||
|
|
||||||
if (hasModel()) {
|
if (hasModel()) {
|
||||||
if (_model) {
|
if (_model) {
|
||||||
// convert the QString from getModelURL to a URL
|
|
||||||
_url = getModelURL();
|
|
||||||
|
|
||||||
// check if the URL has changed
|
// check if the URL has changed
|
||||||
if (_url != _model->getURL()) {
|
auto& currentURL = getParsedModelURL();
|
||||||
qDebug().noquote() << "Updating model URL: " << _url.toDisplayString();
|
if (currentURL != _model->getURL()) {
|
||||||
_model->setURL(_url);
|
qDebug().noquote() << "Updating model URL: " << currentURL.toDisplayString();
|
||||||
|
_model->setURL(currentURL);
|
||||||
}
|
}
|
||||||
|
|
||||||
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
||||||
|
|
|
@ -79,7 +79,6 @@ private:
|
||||||
bool _originalTexturesRead = false;
|
bool _originalTexturesRead = false;
|
||||||
QVector<QVector<glm::vec3>> _points;
|
QVector<QVector<glm::vec3>> _points;
|
||||||
bool _dimensionsInitialized = true;
|
bool _dimensionsInitialized = true;
|
||||||
QUrl _url;
|
|
||||||
|
|
||||||
render::ItemID _myMetaItem;
|
render::ItemID _myMetaItem;
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,7 @@ public:
|
||||||
|
|
||||||
static const QString DEFAULT_MODEL_URL;
|
static const QString DEFAULT_MODEL_URL;
|
||||||
const QString& getModelURL() const { return _modelURL; }
|
const QString& getModelURL() const { return _modelURL; }
|
||||||
|
const QUrl& getParsedModelURL() const { return _parsedModelURL; }
|
||||||
|
|
||||||
static const QString DEFAULT_COMPOUND_SHAPE_URL;
|
static const QString DEFAULT_COMPOUND_SHAPE_URL;
|
||||||
const QString& getCompoundShapeURL() const { return _compoundShapeURL; }
|
const QString& getCompoundShapeURL() const { return _compoundShapeURL; }
|
||||||
|
@ -75,7 +76,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
// model related properties
|
// 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);
|
virtual void setCompoundShapeURL(const QString& url);
|
||||||
|
|
||||||
|
|
||||||
|
@ -134,6 +135,7 @@ protected:
|
||||||
|
|
||||||
rgbColor _color;
|
rgbColor _color;
|
||||||
QString _modelURL;
|
QString _modelURL;
|
||||||
|
QUrl _parsedModelURL;
|
||||||
QString _compoundShapeURL;
|
QString _compoundShapeURL;
|
||||||
|
|
||||||
AnimationPropertyGroup _animationProperties;
|
AnimationPropertyGroup _animationProperties;
|
||||||
|
|
Loading…
Reference in a new issue