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
Export plugin / exporter for blender
Moderators: jesterKing, stiv
-
- Posts: 180
- Joined: Wed Oct 16, 2002 7:27 pm
- Location: Somewhere below the rivers in Holland (but not Limburg)
Re: Export plugin / exporter for blender
Hi,
why don't you use Python for export/import capabilities?
With regards,
Michel
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
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
-
- Posts: 180
- Joined: Wed Oct 16, 2002 7:27 pm
- Location: Somewhere below the rivers in Holland (but not Limburg)
Hi,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....
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.
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.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 !
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
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
to initialise things and
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...
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: Select all
BLI_where_am_i(bprogname, argv[0]);
Code: Select all
Main *test = BLO_read_from_file("/home/newtux/test.blend", &error);
and about python, even in C it is very loooong to create BSP files, so i prefere not to imagine in python...