mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 06:03:26 +02:00
Warn user if cannot evaluate model's textures property
This commit is contained in:
parent
a3ceb3a298
commit
f64481c510
1 changed files with 5 additions and 1 deletions
|
@ -129,7 +129,11 @@ void RenderableModelEntityItem::remapTextures() {
|
||||||
QJsonObject currentTexturesAsJsonObject = currentTexturesAsJson.object();
|
QJsonObject currentTexturesAsJsonObject = currentTexturesAsJson.object();
|
||||||
QVariantMap currentTextureMap = currentTexturesAsJsonObject.toVariantMap();
|
QVariantMap currentTextureMap = currentTexturesAsJsonObject.toVariantMap();
|
||||||
|
|
||||||
QJsonDocument texturesAsJson = QJsonDocument::fromJson(_textures.toUtf8());
|
QJsonParseError error;
|
||||||
|
QJsonDocument texturesAsJson = QJsonDocument::fromJson(_textures.toUtf8(), &error);
|
||||||
|
if (error.error != QJsonParseError::NoError) {
|
||||||
|
qCWarning(entitiesrenderer) << "Could not evaluate textures property:" << _textures;
|
||||||
|
}
|
||||||
QJsonObject texturesAsJsonObject = texturesAsJson.object();
|
QJsonObject texturesAsJsonObject = texturesAsJson.object();
|
||||||
QVariantMap textureMap = texturesAsJsonObject.toVariantMap();
|
QVariantMap textureMap = texturesAsJsonObject.toVariantMap();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue