clean all warnings for vs-2019
This commit is contained in:
@@ -183,7 +183,7 @@ namespace glTF
|
||||
return 1;
|
||||
default:
|
||||
std::string err = "GLTF: Unsupported Component Type ";
|
||||
err += t;
|
||||
err += std::to_string( t );
|
||||
throw DeadlyImportError(err);
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,6 @@ Open Asset Import Library (assimp)
|
||||
|
||||
Copyright (c) 2006-2020, assimp team
|
||||
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use of this software in source and binary forms,
|
||||
@@ -44,6 +43,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <rapidjson/writer.h>
|
||||
#include <rapidjson/prettywriter.h>
|
||||
|
||||
#pragma warning(push)
|
||||
#pragma warning( disable : 4706)
|
||||
|
||||
namespace glTF {
|
||||
|
||||
using rapidjson::StringBuffer;
|
||||
@@ -699,6 +701,6 @@ namespace glTF {
|
||||
w.WriteObjects(d);
|
||||
}
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -347,20 +347,19 @@ void glTFExporter::GetMatColorOrTex(const aiMaterial* mat, glTF::TexProperty& pr
|
||||
prop.texture->source = mAsset->images.Create(imgId);
|
||||
|
||||
if (path[0] == '*') { // embedded
|
||||
aiTexture* tex = mScene->mTextures[atoi(&path[1])];
|
||||
aiTexture* curTex = mScene->mTextures[atoi(&path[1])];
|
||||
|
||||
prop.texture->source->name = tex->mFilename.C_Str();
|
||||
prop.texture->source->name = curTex->mFilename.C_Str();
|
||||
|
||||
uint8_t* data = reinterpret_cast<uint8_t*>(tex->pcData);
|
||||
prop.texture->source->SetData(data, tex->mWidth, *mAsset);
|
||||
uint8_t *data = reinterpret_cast<uint8_t *>(curTex->pcData);
|
||||
prop.texture->source->SetData(data, curTex->mWidth, *mAsset);
|
||||
|
||||
if (tex->achFormatHint[0]) {
|
||||
if (curTex->achFormatHint[0]) {
|
||||
std::string mimeType = "image/";
|
||||
mimeType += (memcmp(tex->achFormatHint, "jpg", 3) == 0) ? "jpeg" : tex->achFormatHint;
|
||||
mimeType += (memcmp(curTex->achFormatHint, "jpg", 3) == 0) ? "jpeg" : curTex->achFormatHint;
|
||||
prop.texture->source->mimeType = mimeType;
|
||||
}
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
prop.texture->source->uri = path;
|
||||
}
|
||||
|
||||
@@ -993,7 +992,7 @@ void glTFExporter::ExportAnimations()
|
||||
|
||||
for (unsigned int j = 0; j < 3; ++j) {
|
||||
std::string channelType;
|
||||
int channelSize;
|
||||
int channelSize=0;
|
||||
switch (j) {
|
||||
case 0:
|
||||
channelType = "rotation";
|
||||
|
||||
Reference in New Issue
Block a user