Merge pull request #1860 from wanadev/gltf2-duplicated-textures

[glTF2] Not duplicating embedded textures
pull/1872/head
Kim Kulling 2018-04-02 10:24:34 +02:00 committed by GitHub
commit 00e2e60b67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -316,11 +316,9 @@ void glTF2Exporter::GetMatTex(const aiMaterial* mat, Ref<Texture>& texture, aiTe
std::string path = tex.C_Str();
if (path.size() > 0) {
if (path[0] != '*') {
std::map<std::string, unsigned int>::iterator it = mTexturesByPath.find(path);
if (it != mTexturesByPath.end()) {
texture = mAsset->textures.Get(it->second);
}
std::map<std::string, unsigned int>::iterator it = mTexturesByPath.find(path);
if (it != mTexturesByPath.end()) {
texture = mAsset->textures.Get(it->second);
}
if (!texture) {