Not duplicating textures for embedded ones

pull/1860/head
Alexis Breust 2018-03-29 15:52:05 +02:00
parent 5ad2582317
commit 26ac2ffb6c
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) {