So I've gotten to work implementing this, here's what I just pushed:

- Screen Shot 2011-12-20 at 12.49.16 AM.png (14.75 KiB) Viewed 489 times
Any imagemap or normalmap texture assigned to the normal map slot will get exported as a normalmap tex. It and the bump map texture will be stacked via the multi mix texture.
At the moment, the UI is a little bit awkward. I left the bump map controls as the existing controls to maintain backward compatibility with old scenes. We could instead make TF_bumpmap a tex-only param and add a separate bump height field. This makes the panel a bit neater aesthetically, and also gets rid of the pointless T and M buttons. (That M button on bump map literally does nothing now. The scale-tex is still exported, but is never called by any parameter, the multi-mix tex that has the bump height as its channel weight is used instead). The nicer UI would look something like this, but comes at the cost of breaking bump height in existing scenes:

- Screen Shot 2011-12-20 at 12.56.59 AM.png (14.21 KiB) Viewed 489 times
Finally, this won't work with the blender-image texture at the moment, and after a bit I figured out why. The code is a modified version of the code that runs the diffuse/reflection alpha feature, and it turns out that cannot handle blenders image tex either. (the main reason is that the filename parameter is located somewhere else). I'll see what I can do about this tomorrow. It's now 1AM here though, and I should've been in bed awhile ago as it is.
