FBX: closes https://github.com/assimp/assimp/issues/1619: return correct index for embedded textures.

pull/1620/head
Kim Kulling 2017-12-07 09:44:48 +01:00
parent 26cdec5633
commit 0588d6cccf
1 changed files with 2 additions and 3 deletions

View File

@ -440,12 +440,11 @@ private:
bool FindTextureIndexByFilename(const Video& video, unsigned int& index) {
index = 0;
const char* videoFileName = video.FileName().c_str();
for (auto texture = textures_converted.begin(); texture != textures_converted.end(); ++texture)
{
for (auto texture = textures_converted.begin(); texture != textures_converted.end(); ++texture) {
if (!strcmp(texture->first->FileName().c_str(), videoFileName)) {
index = texture->second;
return true;
}
index++;
}
return false;
}