From 0588d6cccf7d0d0a9d3e028143c23f5fb937e1b9 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 7 Dec 2017 09:44:48 +0100 Subject: [PATCH] FBX: closes https://github.com/assimp/assimp/issues/1619: return correct index for embedded textures. --- code/FBXConverter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/FBXConverter.cpp b/code/FBXConverter.cpp index ea911b270..24bdfdd11 100644 --- a/code/FBXConverter.cpp +++ b/code/FBXConverter.cpp @@ -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; }