Jelajahi Sumber

# BlenderLoader: use dna index to locate scenes, not SC tag. This fixes https://sourceforge.net/projects/assimp/forums/forum/817654/topic/5052480.

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@1183 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
aramis_acg 13 tahun lalu
induk
melakukan
34e7ce131b
1 mengubah file dengan 5 tambahan dan 1 penghapusan
  1. 5 1
      code/BlenderLoader.cpp

+ 5 - 1
code/BlenderLoader.cpp

@@ -295,7 +295,11 @@ void BlenderImporter::ExtractScene(Scene& out, const FileDatabase& file)
 
 	// we need a scene somewhere to start with. 
 	for_each(const FileBlockHead& bl,file.entries) {
-		if (bl.id == "SC") {
+
+		// Fix: using the DNA index is more reliable to locate scenes
+		//if (bl.id == "SC") {
+
+		if (bl.dna_index == (*it).second) {
 			block = &bl;
 			break;
 		}