diff options
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/sceneformats/assimp/qaiscenehandler.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/sceneformats/assimp/qaiscenehandler.cpp b/src/plugins/sceneformats/assimp/qaiscenehandler.cpp index c24b430fd..1df438233 100644 --- a/src/plugins/sceneformats/assimp/qaiscenehandler.cpp +++ b/src/plugins/sceneformats/assimp/qaiscenehandler.cpp @@ -67,9 +67,7 @@ QT_BEGIN_NAMESPACE -#ifdef _DEBUG void DumpScene(const aiScene* pScene); -#endif QAiSceneHandler::QAiSceneHandler() : m_options(qAiPostProcessPreset) @@ -278,11 +276,10 @@ QGLAbstractScene *QAiSceneHandler::read() qWarning("For details check log: %s/AssimpLog.txt\n", qPrintable(c)); return 0; } -#ifdef _DEBUG else { - DumpScene(scene); + if (!qgetenv("QT3D_DEBUG_MODEL").isEmpty()) + DumpScene(scene); } -#endif QAiScene *qscene = new QAiScene(scene, this); @@ -291,7 +288,6 @@ QGLAbstractScene *QAiSceneHandler::read() return qscene; } -#ifdef _DEBUG void LogPrint(const char* pFormat, ...) { static char buff[1024]; @@ -299,7 +295,9 @@ void LogPrint(const char* pFormat, ...) va_list args; va_start(args, pFormat); vsnprintf( buff, sizeof(buff) - 1, pFormat, args); +#ifndef QT_NO_DEBUG_STREAM qDebug() << buff; +#endif } void DumpAnimation(int i, const aiAnimation* pAnimation, const aiScene* pScene) @@ -353,6 +351,5 @@ void DumpScene(const aiScene* pScene) DumpNodeRecursive(0,pScene->mRootNode,pScene); } } -#endif QT_END_NAMESPACE |