Previous Thread  Next Thread

chat icon loading blender files in my program

darweidu

Posted: Thu Feb 20, 2003 3:50 am
Joined: 20 Feb 2003
Posts: 1
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?
Reply with quote


stuuf133t

Posted: Sun Mar 02, 2003 12:15 am
Joined: 14 Oct 2002
Posts: 7
I don't think there's a spec. 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. It would be nice to have some kind of, maybe, XML-based files, but they would probably just be too slow.
Reply with quote


BloB

Posted: Fri Mar 07, 2003 2:28 pm
Joined: 07 Mar 2003
Posts: 6
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.


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.

In v2.26, there's a nice 1000-line function that can load any blender file dating as early as v1.0 Exclamation

stuuf133t wrote:
It would be nice to have some kind of, maybe, XML-based files, but they would probably just be too slow.


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.
And even if the XML format is too slow and too big, it can be a 'standard intermediary format' for import/export.

BloB.
Reply with quote


Jamesk

Posted: Fri Mar 07, 2003 3:36 pm
Joined: 14 Oct 2002
Posts: 239
There is no specification. Your best bet is to get hold of eeshlo and try out his blender to python converter thingy. But everything that has to do with the .blend format is a longshot.
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group