Previous Thread  Next Thread

chat icon Export plugin / exporter for blender

blackie

Posted: Mon Apr 28, 2003 4:44 pm
Joined: 28 Apr 2003
Posts: 16
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
Reply with quote


Michel

Posted: Thu May 01, 2003 7:48 am
Joined: 16 Oct 2002
Posts: 209
Hi,

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

With regards,
Michel
Reply with quote


blackie

Posted: Thu May 01, 2003 9:31 am
Joined: 28 Apr 2003
Posts: 16
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
Reply with quote


Michel

Posted: Thu May 01, 2003 1:45 pm
Joined: 16 Oct 2002
Posts: 209
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 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 Smile

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

With regards,
Michel
Reply with quote


DarkGanja

Posted: Mon May 12, 2003 6:42 pm
Joined: 12 May 2003
Posts: 1
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 Very Happy

you have to use
Code:

BLI_where_am_i(bprogname, argv[0]);

to initialise things and
Code:

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...
Reply with quote


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