Merge branch 'master' into qt_assimp_viewer
commit
5b23492421
|
@ -1216,12 +1216,15 @@ inline void Asset::Load(const std::string& pFile, bool isBinary)
|
||||||
|
|
||||||
// Read the "scene" property, which specifies which scene to load
|
// Read the "scene" property, which specifies which scene to load
|
||||||
// and recursively load everything referenced by it
|
// and recursively load everything referenced by it
|
||||||
|
unsigned int sceneIndex = 0;
|
||||||
if (Value* scene = FindUInt(doc, "scene")) {
|
if (Value* scene = FindUInt(doc, "scene")) {
|
||||||
unsigned int sceneIndex = scene->GetUint();
|
sceneIndex = scene->GetUint();
|
||||||
|
}
|
||||||
|
|
||||||
Ref<Scene> s = scenes.Retrieve(sceneIndex);
|
if (Value* scenesArray = FindArray(doc, "scenes")) {
|
||||||
|
if (sceneIndex < scenesArray->Size()) {
|
||||||
this->scene = s;
|
this->scene = scenes.Retrieve(sceneIndex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
|
|
Loading…
Reference in New Issue