How should I go about loading blender files in my own program?
I want to write a little model-loading program, except I can't find out how I can load the blender models. Is there a (C or c++) library I can include in my program so I can read a .BLENDER file and get at the data?
If there is no library, is there a specification for the .BLENDER file format?
loading blender files in my program
Moderators: jesterKing, stiv
Well, now that the sources are open, anybody can look at what Blender does to load or save files. This story about memory dumps is not so bad as one would think. It's not a raw memory dump. It's just that most structure are copied directly from memory to file 'as is'. But the file also contains a special entry that gives the definitions of all structures used, so that everything can be loaded nicely anyway, even if fields are added or removed in a future release.stuuf133t wrote:I heard once that the file format is essentially a memory dump, closely related to how it stores datablocks in memory, and dependant on the particular version used.
In v2.26, there's a nice 1000-line function that can load any blender file dating as early as v1.0

I'm currently trying to do something that could be close to that. I'm also trying to document the file format on my way (in french). If I manage to finish that and if anybody seems interested, I will share all that.stuuf133t wrote:It would be nice to have some kind of, maybe, XML-based files, but they would probably just be too slow.
And even if the XML format is too slow and too big, it can be a 'standard intermediary format' for import/export.
BloB.