Programmaticaly convert blender file


I though I had seen once a line of code to convert .blend to .j3o but I cant find it anymore in google nor this forum

anyone ?


come on nobody here?
I am pretty sure it holds in one line of code, I tried finding an example, I dug into the repository and everything, but I cand find it


you can take a look at jme3_ext_assettools/ at master · davidB/jme3_ext_assettools · GitHub
I use it to convert .blend, .obj,… from gradle task (the project is a set of tools for asset pipeline).

1 Like

BinaryExporter.getInstance().save(assetManager.loadModel(“Models/jcxijifr.blend”), new File(OUTPUT_FILE));

thx mate

thx, I’ll check these out :slight_smile:

@Riccardo said: BinaryExporter.getInstance().save(assetManager.loadModel("Models/jcxijifr.blend"), new File(OUTPUT_FILE));

Hi Riccardo,

It does not work :frowning:

java.lang.IllegalStateException: No loader registered for type “blend”

any idea how I could fix this ?

You should : have the jme-blender.jar in the classpath and register a loader for “.blend” see the source I linked.

yep I found it here