Added validation step, added helper macro AI_BUILD_KEY to the material system.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@59 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
aramis_acg
2008-06-15 10:27:08 +00:00
parent d6fc5de7d5
commit 758e092449
25 changed files with 1287 additions and 182 deletions
+3 -4
View File
@@ -43,6 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "ASELoader.h"
#include "3DSSpatialSort.h"
#include "MaterialSystem.h"
#include "StringComparison.h"
#include "TextureTransform.h"
#include "fast_atof.h"
@@ -58,8 +59,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using namespace Assimp;
using namespace Assimp::ASE;
#define LOGOUT_WARN(x) DefaultLogger::get()->warn(x);
// ------------------------------------------------------------------------------------------------
// Constructor to be privately used by Importer
ASEImporter::ASEImporter()
@@ -619,7 +618,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
if (mesh.iMaterialIndex >= this->mParser->m_vMaterials.size())
{
mesh.iMaterialIndex = (unsigned int)this->mParser->m_vMaterials.size()-1;
LOGOUT_WARN("Material index is out of range");
DefaultLogger::get()->warn("Material index is out of range");
}
@@ -640,7 +639,7 @@ void ASEImporter::ConvertMeshes(ASE::Mesh& mesh, std::vector<aiMesh*>& avOutMesh
// check range
if (mesh.mFaces[i].iMaterial >= vSubMaterials.size())
{
LOGOUT_WARN("Submaterial index is out of range");
DefaultLogger::get()->warn("Submaterial index is out of range");
// use the last material instead
aiSplit[vSubMaterials.size()-1].push_back(i);