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
Hi,
why don't you use Python for export/import capabilities?
With regards,
Michel
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
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
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...