First of all I would like to say that Blender is truly amazing.... a jewel of the open source world! You guys/gals are doing a great job
I am posting here because a project I am working on (Galactic Vice
) requires me to write a plug-in that is capable of importing/exporting to/from Blender; models from a custom format.
Taking a look at various export scripts included with Blender it seems as if Blender uses Python as the quick-n-easy interface for doing importing/exporting. I was wondering if it is possible to develop C/C++ equivalents of these scripts.
If not, is it possible to develop them in a language other than Python, say PHP/Perl/Lua? (references/links to tutorials and/or manuals would be great)
Python is quite an interesting language that I plan to learn someday, but if anything learning a new language takes time -- something that nobody ever has enough of
I would highly appreciate any documentation/guides/pointers for developing import/export plug-ins using C, Perl, etc, that you could give me
It's possible to do it in c/c++ however you'd have to go through the headache of
distributing your own version of blender with the modified code
and or getting your code accepted into the main branch which might
be more work than your looking for.
I'm no fan of python, having said that if I were writing an importer/exporter
I'd do it in python. The API is python based and best bet is looking at the other
importers/exporters as examples. Other languages aren't really an option.
The other option is you could write a script to convert your data to a known
file format.that blender supports: collada, obj, dfx...
Then your free to use whatever language you want.
|I'm no fan of python |
Blasphemy! But other than that, everything SirDude said is spot on. The original point of having a scripting API was to enable creating importers and exporters.
As for using other scripting languages like lua, you will need to embed the interpreter as well as writing the interfaces to Blender's internal data structs and functions. No small task.
Considering that python is an easy language to learn - anyone with a bit of experience in any language can pick up to be useful in an hour or two - do your plug-in in python first and then port it to C/C++ later if you still feel the need.
Ahh, that's too bad... I figured there might be an API similar to how Gimp does plug-ins. Currently for Galactic Vice we just export everything as key-framed OBJ models, then batch-convert them into an animated model format that fits out needs.
Looks like I just need to find time to learn the basics of Python. Are there any good references to Blender's Python API that could get me going in the right direction?
Thanks too both of you for the help!
You could subcontract the job to someone with Python experience and Blender experience.