Export plugin / exporter for blender

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

blackie
Posts: 16
Joined: Mon Apr 28, 2003 5:15 pm

Export plugin / exporter for blender

Postby blackie » Mon Apr 28, 2003 5:44 pm

hi all !

i think about writing an exporter for a fileformat i once created for my own 3d engine.
i looked in the blender sources, especially in the routines for writing blen files (not that useful, besause of memory dumps and complex structure )
and the routines for writing dxf files ( very useful )

in the following file are the routines for writing the dxf, vrml and videoscape files:

/blender/source/blender/blenkernel/intern/exotic.c

to get all the object data of the scene, there seems to be a variable called G which is used to access the whole scene.
unfortunalety i did not find anything further about this thing.

can anyone help me or does anyone have any experience with exporters ?
does anyone know how to access the scene content ?

i extracted some documetation with doxygen from blender and now i try to get through this but this is a LOT of work.


blackie

Michel
Posts: 208
Joined: Wed Oct 16, 2002 7:27 pm
Location: Somewhere below the rivers in Holland (but not Limburg)

Re: Export plugin / exporter for blender

Postby Michel » Thu May 01, 2003 8:48 am

Hi,

why don't you use Python for export/import capabilities?

With regards,
Michel

blackie
Posts: 16
Joined: Mon Apr 28, 2003 5:15 pm

Postby blackie » Thu May 01, 2003 10:31 am

hi !

well i already looked at an example export plugin for blender written in python and maybe i could modify it and try to write my own.
but this is the thing, i don't know python and i also think that blender needs some native build in export plugins for general file formats like 3ds etc....

so when i get involved with writing my own native code maybe i can contribute to some other exporters or help with it !

blackie

Michel
Posts: 208
Joined: Wed Oct 16, 2002 7:27 pm
Location: Somewhere below the rivers in Holland (but not Limburg)

Postby Michel » Thu May 01, 2003 2:45 pm

blackie wrote:but this is the thing, i don't know python and i also think that blender needs some native build in export plugins for general file formats like 3ds etc....


Hi,

Well, the python programming language is not very complex and in my opinion not 'knowing' python - or any language for that mather - is no excuse for implementing exporters directly in Blender. There's some really good documentation at http://www.python.org.

blackie wrote:so when i get involved with writing my own native code maybe i can contribute to some other exporters or help with it !


The thing Blender really needs is a mechanism for supporting Plug-ins in a way that they can be easily added to any menu, toolbox or whatever. If that's possible, then exporters can be distributed with Blender. Such a mechanism still needs to be implemented though, so maybe you can help us out here? Please join in discussions or start one at the mailing list.

VRML import/export will be moved out of blender and created as a seperate plugin. Some help on this is still needed though :)

We should really avoid getting all the possible features in blender. Some of those features are perfectly suitable as plugins.

With regards,
Michel

DarkGanja
Posts: 1
Joined: Mon May 12, 2003 7:32 pm

Postby DarkGanja » Mon May 12, 2003 7:42 pm

Hi
i also am trying to create an importer, but i am far tooooooo lazy and newbie to read the file creator sources.
what i did wass simply a rewrite the main() of blender :D

you have to use

Code: Select all

BLI_where_am_i(bprogname, argv[0]);

to initialise things and

Code: Select all

Main *test = BLO_read_from_file("/home/newtux/test.blend", &error);

to have blender load his file, then you have the Main struct that is the usual blender structures describing the scene, most is in DNA_main_types.h and DNA_mesh_types.h, but i am still not able to understand.

and about python, even in C it is very loooong to create BSP files, so i prefere not to imagine in python...


Return to “Coding Blender”

Who is online

Users browsing this forum: No registered users and 1 guest