lsalzman / iqm

Inter-Quake Model format development kit
MIT License
239 stars 73 forks source link

Keep order of materials on export #59

Closed OrdinaryMagician closed 1 year ago

OrdinaryMagician commented 1 year ago

I have noticed when exporting a mesh with multiple materials that the material assignments sometimes get shuffled around on the IQM file. This is far from intuitive and becomes a problem when I want to dynamically replace textures in the engine I use, and the indices don't match the source file.

Would it be possible to fix this?

lsalzman commented 1 year ago

I can attempt it. Give me a bit to see if I can come up with something.

lsalzman commented 1 year ago

I tried a quick hack on the 2.93 exporter. Can you test it for me to see if I did any good?

OrdinaryMagician commented 1 year ago

It's working correctly now, yes.