Updated assimp to latest

This commit is contained in:
Areloch 2019-03-05 14:39:38 -06:00
parent 25ce4477ce
commit 161bf7f83b
461 changed files with 34662 additions and 30165 deletions

View file

@ -3,7 +3,8 @@
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2017, assimp team
Copyright (c) 2006-2019, assimp team
All rights reserved.
@ -48,11 +49,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef ASSIMP_BUILD_NO_MD5_IMPORTER
// internal headers
#include "RemoveComments.h"
#include <assimp/RemoveComments.h>
#include "MD5Loader.h"
#include "StringComparison.h"
#include "fast_atof.h"
#include "SkeletonMeshBuilder.h"
#include <assimp/StringComparison.h>
#include <assimp/fast_atof.h>
#include <assimp/SkeletonMeshBuilder.h>
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/IOSystem.hpp>
@ -358,7 +359,7 @@ void MD5Importer::LoadMD5MeshFile ()
// Check whether we can read from the file
if( file.get() == NULL || !file->FileSize()) {
DefaultLogger::get()->warn("Failed to access MD5MESH file: " + pFile);
ASSIMP_LOG_WARN("Failed to access MD5MESH file: " + pFile);
return;
}
bHadMD5Mesh = true;
@ -419,6 +420,9 @@ void MD5Importer::LoadMD5MeshFile ()
// generate unique vertices in our internal verbose format
MakeDataUnique(meshSrc);
std::string name( meshSrc.mShader.C_Str() );
name += ".msh";
mesh->mName = name;
mesh->mNumVertices = (unsigned int) meshSrc.mVertices.size();
mesh->mVertices = new aiVector3D[mesh->mNumVertices];
mesh->mTextureCoords[0] = new aiVector3D[mesh->mNumVertices];
@ -470,7 +474,6 @@ void MD5Importer::LoadMD5MeshFile ()
MD5::ConvertQuaternion( boneSrc.mRotationQuat, boneSrc.mRotationQuatConverted );
}
//unsigned int g = 0;
pv = mesh->mVertices;
for (MD5::VertexList::const_iterator iter = meshSrc.mVertices.begin();iter != meshSrc.mVertices.end();++iter,++pv) {
// compute the final vertex position from all single weights
@ -481,7 +484,7 @@ void MD5Importer::LoadMD5MeshFile ()
for (unsigned int jub = (*iter).mFirstWeight, w = jub; w < jub + (*iter).mNumWeights;++w)
fSum += meshSrc.mWeights[w].mWeight;
if (!fSum) {
DefaultLogger::get()->error("MD5MESH: The sum of all vertex bone weights is 0");
ASSIMP_LOG_ERROR("MD5MESH: The sum of all vertex bone weights is 0");
continue;
}
@ -558,7 +561,9 @@ void MD5Importer::LoadMD5MeshFile ()
// set this also as material name
mat->AddProperty(&meshSrc.mShader,AI_MATKEY_NAME);
}
else mat->AddProperty(&meshSrc.mShader,AI_MATKEY_TEXTURE_DIFFUSE(0));
else {
mat->AddProperty(&meshSrc.mShader, AI_MATKEY_TEXTURE_DIFFUSE(0));
}
mesh->mMaterialIndex = n++;
}
#endif
@ -573,7 +578,7 @@ void MD5Importer::LoadMD5AnimFile ()
// Check whether we can read from the file
if( !file.get() || !file->FileSize()) {
DefaultLogger::get()->warn("Failed to read MD5ANIM file: " + pFile);
ASSIMP_LOG_WARN("Failed to read MD5ANIM file: " + pFile);
return;
}
LoadFileIntoMemory(file.get());
@ -587,8 +592,7 @@ void MD5Importer::LoadMD5AnimFile ()
// generate and fill the output animation
if (animParser.mAnimatedBones.empty() || animParser.mFrames.empty() ||
animParser.mBaseFrames.size() != animParser.mAnimatedBones.size()) {
DefaultLogger::get()->error("MD5ANIM: No frames or animated bones loaded");
ASSIMP_LOG_ERROR("MD5ANIM: No frames or animated bones loaded");
}
else {
bHadMD5Anim = true;