Where is main?

I am looking at the source code for blender. I usually start with the file that has the main function in it but can not seem to find it. I also looked for winmain just incase they used that instead but still no joy. Would some one kindly direct me to the right file. And since I am actually looking into this for the purpose of reading blend files rather then changing blender this is not a question for blender.org (I think anyways).

creator.c

Erm, may I ask why you’d like to read a blend file? If you want to import a blend, you’re always better off writing an Python exporter.

http://blender3d.org/cms/Blender_Architecture.336.0.html
http://blender3d.org/cms/Notes_on_SDNA.436.0.html
http://blender3d.org/cms/Blender_file_reading.498.0.html

Thanks, Cotejrp.

Well Blender does a great job at exporting on its own. I am in the process of creating a game. Since I can program in C/C++, Basic (several variation including both interpreted types and compiled), Pascal, Assembly, and several other languages, and the programing is in early stages it would be easier to just use blend files so nothing is lost. We get all the textures, models and just as importaint the rigging we are spending so much time developing. I can just write it so that blend files are the main type of resource file used for visuals. This still leaves much to be worked on. The engine, scripting methods (I lean tward C++ since the program is being writen in it. Others disagree at this point.), AIs, etc. The blend file is writen to take advantage of openGL because that is what blender uses, which is also the library we are using so I hope will make it easier to program the engine.

I can drag this out by adding much more detail but that would just make for a longer post and get people angry. So I will conclude with the following.

If we ever go to publish then we will contact blender.org and work out something with them for the purpose of compensation. If we were to publish it would be importaint to us that every one who put in a lot of time on the project knowingly or unknowingly get what is fair. Since in effect they would be our tools dept this would include the developers of blender. It is only fair that they do get something. Blender is after all a great tool.

Thanks, z3r0 d. This will save me some time. I can gain an understanding of what they did in english then find the methods they used in thier code. My only worry is that I might write code to close to blenders own. I would not want to even unconsiously steal from them.

Note to self: be very carefull to write your own code. :slight_smile: