From 62a8f43ffe2b70aa722fe107cf1a41e8d627b52d Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Thu, 8 Jan 2009 22:44:07 +0000 Subject: [PATCH] FIX: (aiMesh::mNumTextureCoords[n] == 0) is now propagated to 2. Removed ATMNotUptoDate tag from SCons dir. The SCons script is generic. Updated list of contributors. git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@275 67173fc5-114c-0410-ac8e-9d2fd5bffc1f --- CREDITS | 3 +++ code/ProcessHelper.h | 6 +++--- code/ScenePreprocessor.cpp | 5 ++++- workspaces/{scons_ATMNotUpToDate => SCons}/SConstruct | 0 4 files changed, 10 insertions(+), 4 deletions(-) rename workspaces/{scons_ATMNotUpToDate => SCons}/SConstruct (100%) diff --git a/CREDITS b/CREDITS index 2a019dfc3..1c12290d3 100644 --- a/CREDITS +++ b/CREDITS @@ -47,3 +47,6 @@ supplied various XFiles for testing purposes. - Tizian Wieland searched the web for several thousands of test models for internal use + +- John Connors +supplied patches for linux and SCons. \ No newline at end of file diff --git a/code/ProcessHelper.h b/code/ProcessHelper.h index e2c53b653..ea1861c01 100644 --- a/code/ProcessHelper.h +++ b/code/ProcessHelper.h @@ -116,7 +116,7 @@ inline const char* TextureTypeToString(aiTextureType in) case aiTextureType_SHININESS: return "Shininess"; default: - return "LARGE ERROR, please leave the room immediately and call the police"; + return "HUGE ERROR, please leave the room immediately and call the police"; } } @@ -139,7 +139,7 @@ inline const char* MappingTypeToString(aiTextureMapping in) case aiTextureMapping_OTHER: return "Other"; default: - return "LARGE ERROR, please leave the room immediately and call the police"; + return "HUGE ERROR, please leave the room immediately and call the police"; } } @@ -187,5 +187,5 @@ class DestroySpatialSortProcess : public BaseProcess } }; -} // !! Assimp +} // ! namespace Assimp #endif // !! AI_PROCESS_HELPER_H_INCLUDED diff --git a/code/ScenePreprocessor.cpp b/code/ScenePreprocessor.cpp index 8cbacb167..bea87c75c 100644 --- a/code/ScenePreprocessor.cpp +++ b/code/ScenePreprocessor.cpp @@ -69,7 +69,10 @@ void ScenePreprocessor::ProcessMesh (aiMesh* mesh) // If aiMesh::mNumUVComponents is *not* set assign the default value of 2 for (unsigned int i = 0; i < AI_MAX_NUMBER_OF_TEXTURECOORDS; ++i) { - if (!mesh->mNumUVComponents[i]) + if (!mesh->mTextureCoords[i]) + mesh->mNumUVComponents[i] = 0; + + else if( !mesh->mNumUVComponents[i]) mesh->mNumUVComponents[i] = 2; } diff --git a/workspaces/scons_ATMNotUpToDate/SConstruct b/workspaces/SCons/SConstruct similarity index 100% rename from workspaces/scons_ATMNotUpToDate/SConstruct rename to workspaces/SCons/SConstruct