UBJsonReader (Libgdx) unable to to read UBJson from Python(Blender)
- by daniel
I am working on an export tool from Blender to Libgdx, exports like custom attributes and other information (Almost completed), this is a very cool tool that will speed up a lot your works, after I completed I will send to public to contribute forum, Export format is uses python's Standard Json module and readable text, it of course works fine, but I wanna also have a Binary Json export for faster load, so users can Export Straight to Libgdx, but after I search I found that UBJson with draft9.py (simpleubjson 0.6.1) encode is seems matches with one FBXConverter's UBJsonWriter( Xoppa wrote), but when I export, I am not able to read the file, and send this errors (Java heap space)
seems this is a different between byte sizes in UBJson(python) and UBJsonReader.
how can I write a correct one in python that matches with Libgdx's UBJsonReader, and would be cross-platform?
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.OutOfMemoryError: Java heap space
at
com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:120)
Caused by: java.lang.OutOfMemoryError: Java heap space
at com.badlogic.gdx.utils.UBJsonReader.readString(UBJsonReader.java:162)
at com.badlogic.gdx.utils.UBJsonReader.parseString(UBJsonReader.java:150)
at com.badlogic.gdx.utils.UBJsonReader.parseObject(UBJsonReader.java:112)
at com.badlogic.gdx.utils.UBJsonReader.parse(UBJsonReader.java:59)
at com.badlogic.gdx.utils.UBJsonReader.parse(UBJsonReader.java:52)
at com.badlogic.gdx.utils.UBJsonReader.parse(UBJsonReader.java:36)
at com.badlogic.gdx.utils.UBJsonReader.parse(UBJsonReader.java:45)
at com.me.gdximportexport.GdxImportExport.create(GdxImportExport.java:43)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:136)
at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)
Tested on UbuntuStudio 13.10 with OpenJdk 7, and Windows 7 with jdk 7
Thanks for any guides.