mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 03:03:35 +02:00
don't allow buildModelMesh to spam logs when it encounters flawed models
This commit is contained in:
parent
5a0f0972da
commit
1e2e4001b1
1 changed files with 6 additions and 4 deletions
|
@ -29,7 +29,7 @@
|
||||||
#include <OctalCode.h>
|
#include <OctalCode.h>
|
||||||
#include <Shape.h>
|
#include <Shape.h>
|
||||||
#include <gpu/Format.h>
|
#include <gpu/Format.h>
|
||||||
|
#include <LogHandler.h>
|
||||||
|
|
||||||
#include "FBXReader.h"
|
#include "FBXReader.h"
|
||||||
#include "ModelFormatLogging.h"
|
#include "ModelFormatLogging.h"
|
||||||
|
@ -1281,9 +1281,11 @@ FBXLight extractLight(const FBXNode& object) {
|
||||||
|
|
||||||
#if USE_MODEL_MESH
|
#if USE_MODEL_MESH
|
||||||
void buildModelMesh(ExtractedMesh& extracted) {
|
void buildModelMesh(ExtractedMesh& extracted) {
|
||||||
|
static QString repeatedMessage = LogHandler::getInstance().addRepeatedMessageRegex("buildModelMesh failed -- .*");
|
||||||
|
|
||||||
if (extracted.mesh.vertices.size() == 0) {
|
if (extracted.mesh.vertices.size() == 0) {
|
||||||
extracted.mesh._mesh = model::Mesh();
|
extracted.mesh._mesh = model::Mesh();
|
||||||
qDebug() << "buildModelMesh failed -- no vertices";
|
qCDebug(modelformat) << "buildModelMesh failed -- no vertices";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
FBXMesh& fbxMesh = extracted.mesh;
|
FBXMesh& fbxMesh = extracted.mesh;
|
||||||
|
@ -1370,7 +1372,7 @@ void buildModelMesh(ExtractedMesh& extracted) {
|
||||||
|
|
||||||
if (! totalIndices) {
|
if (! totalIndices) {
|
||||||
extracted.mesh._mesh = model::Mesh();
|
extracted.mesh._mesh = model::Mesh();
|
||||||
qDebug() << "buildModelMesh failed -- no indices";
|
qCDebug(modelformat) << "buildModelMesh failed -- no indices";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1410,7 +1412,7 @@ void buildModelMesh(ExtractedMesh& extracted) {
|
||||||
mesh.setPartBuffer(pbv);
|
mesh.setPartBuffer(pbv);
|
||||||
} else {
|
} else {
|
||||||
extracted.mesh._mesh = model::Mesh();
|
extracted.mesh._mesh = model::Mesh();
|
||||||
qDebug() << "buildModelMesh failed -- no parts";
|
qCDebug(modelformat) << "buildModelMesh failed -- no parts";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue