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:
+3
-4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user