소스 검색

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

Kim Kulling 7 년 전
부모
커밋
0588d6cccf
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 3
      code/FBXConverter.cpp

+ 2 - 3
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;
 	}