I'm developing a program that outputs object files that can be imported into Blender. The output consists of a WaveFront object file (.obj) with a Material Library File (.mtl) that go side-by-side.
The importing works fine and the textures all show up correctly mapped, however I would like to apply a transformation to the textures so that the scale values don't need to be manually tweaked inside Blender after the import.
Following the specifications for the MTL format (http://paulbourke.net/dataformats/mtl/) the scaling would be transformed by using the
-s argument, like below.
newmtl AM_BBAY_WINDOWS_PIRATE illum 2 Kd 1.000000 1.000000 1.000000 Ka 0.250000 0.250000 0.250000 Ks 0.000000 0.000000 0.000000 Ke 0.000000 0.000000 0.000000 Ns 0.000000 map_Kd -s 1.0 -1.0 1.0 AM_BBAY_WINDOWS_PIRATE.png
Expected behavior: Blender should use
AM_BBAY_WINDOWS_PIRATE.png as the texture file and set the material size to
1.0, -1.0, 1.0.
Actual behavior: The size is kept as default and the file is set to
-s 1.0 -1.0 1.0 AM_BBAY_WINDOWS_PIRATE.png which obviously is invalid and therefore does not work.
Why is Blender completely ignoring the arguments for texture maps in material libraries for imported objects? Is there another method/syntax for Blender that I've missed?