- fbx: improve logging

pull/14/head
Alexander Gessler 2012-08-26 17:54:17 +02:00
parent 9ea7fc2856
commit 51d84dcfc0
1 changed files with 7 additions and 2 deletions

View File

@ -287,13 +287,18 @@ void Document::ReadHeader()
const Scope& shead = *ehead->Compound(); const Scope& shead = *ehead->Compound();
fbxVersion = ParseTokenAsInt(GetRequiredToken(GetRequiredElement(shead,"FBXVersion",ehead),0)); fbxVersion = ParseTokenAsInt(GetRequiredToken(GetRequiredElement(shead,"FBXVersion",ehead),0));
if(Settings().strictMode) {
if(fbxVersion < 7200 || fbxVersion > 7300) { if(fbxVersion < 7200 || fbxVersion > 7300) {
if(Settings().strictMode) {
DOMError("unsupported format version, supported are only FBX 2012 and FBX 2013"\ DOMError("unsupported format version, supported are only FBX 2012 and FBX 2013"\
" in ASCII format (turn off strict mode to try anyhow) "); " in ASCII format (turn off strict mode to try anyhow) ");
} }
else {
DOMWarning("unsupported format version, supported are only FBX 2012 and FBX 2013, trying to read it nevertheless");
}
} }
const Element* const ecreator = shead["Creator"]; const Element* const ecreator = shead["Creator"];
if(ecreator) { if(ecreator) {
creator = ParseTokenAsString(GetRequiredToken(*ecreator,0)); creator = ParseTokenAsString(GetRequiredToken(*ecreator,0));