diff --git a/Switch_Toolbox_Library/GUI.cs b/Switch_Toolbox_Library/GUI.cs index 4d5b2e94..7ef40f6c 100644 --- a/Switch_Toolbox_Library/GUI.cs +++ b/Switch_Toolbox_Library/GUI.cs @@ -59,9 +59,7 @@ namespace Toolbox.Library } public static void CreateMdiWindow(STForm form, bool Show = true) { - var mainform = Application.OpenForms[0]; - - ((IMdiContainer)mainform).AddChildContainer(form); + ((IMdiContainer)Runtime.MainForm).AddChildContainer(form); } public static ObjectEditor GetObjectEditor() { diff --git a/Switch_Toolbox_Library/Generics/STBone.cs b/Switch_Toolbox_Library/Generics/STBone.cs index 2d7d8efd..d63ca4f8 100644 --- a/Switch_Toolbox_Library/Generics/STBone.cs +++ b/Switch_Toolbox_Library/Generics/STBone.cs @@ -30,7 +30,7 @@ namespace Toolbox.Library public short SmoothMatrixIndex; private Matrix4 transform; - private Quaternion rotation; + private Quaternion rotation = Quaternion.Identity; private Vector3 eulerRotation; /// @@ -63,7 +63,7 @@ namespace Toolbox.Library /// /// Gets or sets the scale of the bone in world space. /// - public Vector3 Scale { get; set; } + public Vector3 Scale { get; set; } = Vector3.One; /// /// Gets or sets the rotation of the bone in world space. @@ -94,12 +94,14 @@ namespace Toolbox.Library get { return eulerRotation; } set { eulerRotation = value; - rotation = STMath.FromEulerAngles(value); + rotation = STMath.FromEulerAngles(value); + if (rotation.W == 0) + rotation.W = 1; } } public Vector3 pos = Vector3.Zero, sca = new Vector3(1f, 1f, 1f); - public Quaternion rot = Quaternion.FromMatrix(Matrix3.Zero); + public Quaternion rot = Quaternion.Identity; public Matrix4 invert; public Matrix4 GetTransform() diff --git a/Toolbox/Lib/AampLibraryCSharp.dll b/Toolbox/Lib/AampLibraryCSharp.dll index b88ab65e..edcdac6e 100644 Binary files a/Toolbox/Lib/AampLibraryCSharp.dll and b/Toolbox/Lib/AampLibraryCSharp.dll differ diff --git a/Toolbox/Lib/AampLibraryCSharp.pdb b/Toolbox/Lib/AampLibraryCSharp.pdb index d52f920d..d8d8ba21 100644 Binary files a/Toolbox/Lib/AampLibraryCSharp.pdb and b/Toolbox/Lib/AampLibraryCSharp.pdb differ diff --git a/Toolbox/MainForm.cs b/Toolbox/MainForm.cs index 612f392e..ed0c80cd 100644 --- a/Toolbox/MainForm.cs +++ b/Toolbox/MainForm.cs @@ -1473,7 +1473,8 @@ namespace Toolbox else if (fileFormat is ITextureContainer && exportMode == ExportMode.Textures) { string name = fileFormat.FileName.Split('.').FirstOrDefault(); - outputFolder = Path.Combine(outputFolder, name); + if (settings.SeperateTextureContainers) + outputFolder = Path.Combine(outputFolder, name); if (((ITextureContainer)fileFormat).TextureList.Count > 0) {