libertyernie / brawltools

BrawlBox and BrawlLib
http://forums.kc-mm.com/index.php?topic=67847.0
143 stars 31 forks source link

Collada Exporter exports colors in incorrect format on systems with different culture. #205

Closed blueskythlikesclouds closed 5 years ago

blueskythlikesclouds commented 5 years ago

I've had this issue for like... 4 years? I found the reason last year but didn't get around to actually report it. My language uses comma as decimal separator so it causes vertex colors get exported with incorrect formatting, which screws them up when imported to 3D apps.

I think the issue is right here: https://github.com/libertyernie/brawltools/blob/master/BrawlLib/Modeling/Collada/ColladaExporter.cs#L529

Meanwhile every other vertex attributes seem to be formatted with invariant culture, this isn't done for vertex colors. I suppose it was just overlooked, which gave me lots of struggle, honestly.

The same invariant culture problem might be happening in other parts of the library code as well, but I haven't come across them yet.