Blender File Format

Hello everybody,

I’m writing a small app dealing with OpenGL graphics, and this small app would greatly benefit from importing those nice ellaborated 3d objects from blender.

So i’d like to know the format of the blender files. I’ve done some research and looks like it is just a memory dump of the data structures that Blender uses. Also i’ve read something about building a python script for exporting blender objects to the format of your choice, but i didn’t understand this (the link was broken :frowning: )

My plea is that some of you that know blender to the bone give me some clue about what to do and how to do it. Thanks :slight_smile:

If you’re app is GPL, you can use the .blend loaded from the Blender src tree - you will get maximum compatibility with Blender.

However, I strongly suggest doing the python script thing.

Write a python script to dump the data you need in a format close to what you are doing with OpenGL.

from what I can guess it just writes the structs to a file

check the source on blender.org and the forums there, but there is no good answer for you. Hence it may be worth looking into the xml export that was planned (and it’s progress).

as for python exports, people have written exporters to various formats using the avaliable parts of the python api (for example, the NMesh module). At the moment the python api doesn’t have everything, and can’t do an ideal export to any format of all types.