- fbx: don't die if a file contains no GlobalSettings.

This commit is contained in:
Alexander Gessler
2012-08-26 17:45:09 +02:00
parent cdb7caffbd
commit 9ea7fc2856
2 changed files with 6 additions and 3 deletions

View File

@@ -162,7 +162,7 @@ const Object* LazyObject::Get(bool dieOnError)
}
}
else if (!strncmp(obtype,"Model",length)) {
// do not load IKEffectors yet
// FK and IK effectors are not supported
if (strcmp(classtag.c_str(),"IKEffector") && strcmp(classtag.c_str(),"FKEffector")) {
object.reset(new Model(id,element,doc,name));
}
@@ -318,7 +318,10 @@ void Document::ReadGlobalSettings()
const Scope& sc = parser.GetRootScope();
const Element* const ehead = sc["GlobalSettings"];
if(!ehead || !ehead->Compound()) {
DOMError("no GlobalSettings dictionary found");
DOMWarning("no GlobalSettings dictionary found");
globals.reset(new FileGlobalSettings(*this, boost::make_shared<const PropertyTable>()));
return;
}
boost::shared_ptr<const PropertyTable> props = GetPropertyTable(*this, "", *ehead, *ehead->Compound(), true);