1
0
mirror of synced 2025-01-31 12:23:52 +01:00

Attempt to fix SMD culture issue on export.

This commit is contained in:
KillzXGaming 2021-03-06 11:12:39 -05:00
parent 0dd3ab072c
commit f3705d563a

View File

@ -288,8 +288,7 @@ namespace Toolbox.Library.Animations
public static void Save(STSkeletonAnimation anim, String Fname) public static void Save(STSkeletonAnimation anim, String Fname)
{ {
System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
customCulture.NumberFormat.NumberDecimalSeparator = ".";
STSkeleton Skeleton = anim.GetActiveSkeleton(); STSkeleton Skeleton = anim.GetActiveSkeleton();
@ -333,8 +332,7 @@ namespace Toolbox.Library.Animations
public static void Save(Animation anim, STSkeleton Skeleton, String Fname) public static void Save(Animation anim, STSkeleton Skeleton, String Fname)
{ {
System.Globalization.CultureInfo customCulture = (System.Globalization.CultureInfo)System.Threading.Thread.CurrentThread.CurrentCulture.Clone(); System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
customCulture.NumberFormat.NumberDecimalSeparator = ".";
using (System.IO.StreamWriter file = new System.IO.StreamWriter(@Fname)) using (System.IO.StreamWriter file = new System.IO.StreamWriter(@Fname))
{ {
@ -363,7 +361,7 @@ namespace Toolbox.Library.Animations
Vector3 scale = b.GetScale(); Vector3 scale = b.GetScale();
Vector3 translate = b.GetPosition(); Vector3 translate = b.GetPosition();
file.WriteLine($"{ Skeleton.bones.IndexOf(b)} {translate.X} {translate.Y} {translate.Z} {eul.X} {eul.Y} {eul.Z}"); file.WriteLine($"{ Skeleton.bones.IndexOf(b)} {translate.X} {translate.Y} {translate.Z} {eul.X} {eul.Y} {eul.Z}", customCulture);
} }
} }