mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
Get remap textures through getter
This commit is contained in:
parent
b72c28854c
commit
e4f12c81e0
1 changed files with 3 additions and 4 deletions
|
@ -117,12 +117,11 @@ QVariantMap RenderableModelEntityItem::parseTexturesToMap(QString textures) {
|
|||
QJsonParseError error;
|
||||
QJsonDocument texturesJson = QJsonDocument::fromJson(textures.toUtf8(), &error);
|
||||
if (error.error != QJsonParseError::NoError) {
|
||||
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << _textures;
|
||||
qCWarning(entitiesrenderer) << "Could not evaluate textures property value:" << textures;
|
||||
return _originalTextures;
|
||||
}
|
||||
|
||||
auto parsed = texturesJson.toVariant();
|
||||
return parsed.toMap();
|
||||
return texturesJson.toVariant().toMap();
|
||||
}
|
||||
|
||||
void RenderableModelEntityItem::remapTextures() {
|
||||
|
@ -144,7 +143,7 @@ void RenderableModelEntityItem::remapTextures() {
|
|||
_currentTextures = _originalTextures;
|
||||
}
|
||||
|
||||
auto textures = parseTexturesToMap(_textures);
|
||||
auto textures = parseTexturesToMap(getTextures());
|
||||
|
||||
if (textures != _currentTextures) {
|
||||
geometry->setTextures(textures);
|
||||
|
|
Loading…
Reference in a new issue