Update: I’ve (sadly) worked on it some more today and there’s a new version online. You can find it on icculus: http://svn.icculus.org/darkwar/trunk/base/scripts/

Latest interface

For the past 4 days I’ve been working on and off on some changes to der_ton’s blender2md5 exporter - big thanks to him for developing the exporter in the first place - and in doing so I’ve finally learnt Python, which is an awesome scripting language to say the least.

I haven’t really changed much of the exporter’s internal workings (only a few clean-ups here and there which hopefully didn’t break it) because I mainly concentrated on GUI changes. fleeky, a nice circus fellow who is DarkWar’s only active modeller at the moment, pestered me long enough to add support for exporting multiple animations from Blender to md5, that I finally gave in and started working.

Thank God, Python’s tutorial page is excellent, too - especially ‘Learn Python in 10 Minutes’, which really does a very good job at showing you many language features very fast - which arguably isn’t useful for total newbies but it gives a nice overview and invites you to play around.. and is really helpful when you start to code because you already know about some “advanced” language features early-on and can look them up when you think that they might help you solve a problem more elegantly (in contrast to not knowing about the features at all).

Another tip for Python beginners: get ActivePython and Komodo Edit (or even the IDE if you have the money and/or are a student and willing to go through their registration process, which I might if I’ll happen to work more with Python). Both are free and will get you started with Python coding quickly. They really helped me a lot while learning and coding the new features.

Anyway, so what did I code? First let’s take a look at the original exporter interface:

Old blender2md5 Interface

My first changes were about adding a simple batch system that allows you to set the properties for one animation and mesh to export and then specify a batch file and append them to it. Then you can export all “jobs” from the specified batch file or directly specify it and export from it:

Interface with first change set

This was ok but it didn’t feel that nice - since you’d have to manually edit the batch file if you wanted to change export properties, etc.

Today then I’ve decided to spend one last day on the project and rewrite most of the GUI: it now displays all default buttons at the bottom and allows one to insert as many animations to export as one wishes. It displays the animations each with their own target filename, start and end frame and action dropdown menu in a table and now also exports all other settings to settings files (batch files don’t really describe it correctly). Even better I’ve added support for automatically saving the settings to Blender’s .blend files which should really help automate exporting a lot.

Just open the scene file, open the plugin, hit export and you’re done!

Right now I have disabled (commented out) exporting camera animations because they don’t really fit anymore, but if there’s a need for them, I’ll put them back in).

And finally, here’s the new interface:

New Blender2md5 Interface

Give a try. You can find the python script in Darkwar’s repository: http://svn.icculus.org/darkwar/trunk/base/scripts/

Mirrored for now at: http://home.in.tum.de/~kirschan/blender2md5.py (out-dated but I’m leaving it in case icculus.org is down again and someone badly needs a mostly working exporter)

Either copy it into your Blender plugin directory or manually open it in Blender’s text editor and run it with Alt/Meta-P.

Enjoy and Merry Christmas!