Hi all!
I’m using the Blender 2.5 exporter to export .blend files into Ogre mesh and dotScene files. This python script generates files which have boolean values set to either ‘True’ or ‘False’. Because they are sentence case (like in python’s syntax), the SAXUtil.parseBool method throws the following exception:
[java]org.xml.sax.SAXException: Expected a boolean, got’True’[/java]
I looked into its code and here’s what I found:
[java]public static boolean parseBool(String bool, boolean def) throws SAXException{
if (bool == null || bool.equals(""))
return def;
else if (bool.equals(“false”))
return false;
else if (bool.equals(“true”))
return true;
else
throw new SAXException(“Expected a boolean, got’”+bool+"’");
}[/java]
I think that the function should either use Boolean.parseBool (like all the other functions in this class do), or use bool.equalsIgnoreCase.
Without changing jME3 code, all I can do now is write a method that preprocesses all the ogre files by changing all its boolean values to lowercase.
I am using the August 29 nightly build.
Actually this change was already made recently. If you update from SVN you’ll see it
1 Like
I’ll do just that, thanks.