From 34e7ce131b2ffe92552fc10e27be049824d36a26 Mon Sep 17 00:00:00 2001 From: aramis_acg Date: Thu, 23 Feb 2012 14:02:09 +0000 Subject: [PATCH] # 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 --- code/BlenderLoader.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/BlenderLoader.cpp b/code/BlenderLoader.cpp index acf920f58..002259fb3 100644 --- a/code/BlenderLoader.cpp +++ b/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; }