diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index 2d5392c1..b295fb10 100644 Binary files a/.vs/Switch_Toolbox/v15/.suo and b/.vs/Switch_Toolbox/v15/.suo differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide index c3dd15d0..43866b1a 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 0cca82d5..f202f558 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal differ diff --git a/Switch_FileFormatsMain/FileFormats/Archives/SARC.cs b/Switch_FileFormatsMain/FileFormats/Archives/SARC.cs index 65755e30..9ca87585 100644 --- a/Switch_FileFormatsMain/FileFormats/Archives/SARC.cs +++ b/Switch_FileFormatsMain/FileFormats/Archives/SARC.cs @@ -59,8 +59,10 @@ namespace FirstPlugin ContextMenuStrip = new STContextMenuStrip(); ContextMenuStrip.Items.Add(new STToolStipMenuItem("Save",null, Save, Keys.Control | Keys.S)); - // ContextMenuStrip.Items.Add(new STToolStipMenuItem("Unpack to Folder", null, UnpackToFolder, Keys.Control | Keys.E)); - // ContextMenuStrip.Items.Add(new STToolStipMenuItem("Pack From Folder", null, PackFromFolder, Keys.Control | Keys.R)); + ContextMenuStrip.Items.Add(new STToolStipMenuItem("Rename Actor Files (Odyssey)", null, RenameActors, Keys.Control | Keys.S)); + + // ContextMenuStrip.Items.Add(new STToolStipMenuItem("Unpack to Folder", null, UnpackToFolder, Keys.Control | Keys.E)); + // ContextMenuStrip.Items.Add(new STToolStipMenuItem("Pack From Folder", null, PackFromFolder, Keys.Control | Keys.R)); ContextMenuStrip.Items.Add(new STToolStripSeparator()); ContextMenuStrip.Items.Add(new STToolStipMenuItem("Batch Texture Editor", null, PreviewTextures, Keys.Control | Keys.P)); ContextMenuStrip.Items.Add(new STToolStripSeparator()); @@ -70,6 +72,34 @@ namespace FirstPlugin sarcData.Files.Clear(); } + private void RenameActors(object sender, EventArgs args) + { + string ActorName = Path.GetFileNameWithoutExtension(Text); + + RenameDialog dialog = new RenameDialog(); + dialog.SetString(ActorName); + + if (dialog.ShowDialog() == DialogResult.OK) + { + string NewActorName = dialog.textBox1.Text; + Text = NewActorName + ".szs"; + + foreach (TreeNode node in Nodes) + { + string NodeName = Path.GetFileNameWithoutExtension(node.Text); + string ext = Utils.GetExtension(node.Text); + if (NodeName == ActorName) + { + node.Text = $"{NewActorName}.{ext}"; + } + else if (node.Text.Contains("Attribute.byml")) + { + node.Text = $"{NewActorName}Attribute.byml"; + } + } + } + } + private void UnpackToFolder(object sender, EventArgs args) { diff --git a/Switch_FileFormatsMain/FileFormats/Collision/KCL.cs b/Switch_FileFormatsMain/FileFormats/Collision/KCL.cs index 73a3b161..b4a052c1 100644 --- a/Switch_FileFormatsMain/FileFormats/Collision/KCL.cs +++ b/Switch_FileFormatsMain/FileFormats/Collision/KCL.cs @@ -571,8 +571,6 @@ namespace FirstPlugin Matrix4.CreateScale(Runtime.previewScale) * Matrix4.CreateTranslation(Selected ? editorScene.currentAction.newPos(position) : position)); - defaultShaderProgram.EnableVertexAttributes(); - SetRenderSettings(defaultShaderProgram); Matrix4 camMat = control.ModelMatrix * control.CameraMatrix * control.ProjectionMatrix; @@ -584,7 +582,6 @@ namespace FirstPlugin GL.Uniform3(defaultShaderProgram["ambLightColor"], new Vector3(1)); defaultShaderProgram.EnableVertexAttributes(); - SetRenderSettings(defaultShaderProgram); foreach (KCLModel mdl in models) { diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/CourseMuuntStructs.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/CourseMuuntStructs.cs index 13363f2d..ce9bc90d 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/CourseMuuntStructs.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/CourseMuuntStructs.cs @@ -238,12 +238,6 @@ namespace FirstPlugin.Turbo.CourseMuuntStructs } - - - - - - public List BfresObjects = new List(); public List KclObjects = new List(); diff --git a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs index 6e0e943c..8b8306ed 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/CourseMuunt/TurboMunntEditor.cs @@ -29,44 +29,47 @@ namespace FirstPlugin.Forms { string CourseFolder = System.IO.Path.GetDirectoryName(FilePath); scene = new CourseMuuntScene(by); + + if (File.Exists($"{CourseFolder}/course_kcl.szs")) + scene.AddRenderableKcl($"{CourseFolder}/course_kcl.szs"); + if (File.Exists($"{CourseFolder}/course.kcl")) + scene.AddRenderableKcl($"{CourseFolder}/course.kcl"); + if (File.Exists($"{CourseFolder}/course_model.szs")) { // scene.AddRenderableBfres($"{CourseFolder}/course_model.szs"); - // scene.AddRenderableKcl($"{CourseFolder}/course.kcl"); - foreach (var kcl in scene.KclObjects) - { - viewport.AddDrawable(kcl.Renderer); - kcl.Renderer.UpdateVertexData(); - } - - foreach (var bfres in scene.BfresObjects) - { - viewport.AddDrawable(bfres.BFRESRender); - - bfres.BFRESRender.UpdateVertexData(); - bfres.BFRESRender.UpdateTextureMaps(); - } - viewport.LoadObjects(); } + foreach (var kcl in scene.KclObjects) + { + viewport.AddDrawable(kcl.Renderer); + kcl.Renderer.UpdateVertexData(); + } + + foreach (var bfres in scene.BfresObjects) + { + viewport.AddDrawable(bfres.BFRESRender); + + bfres.BFRESRender.UpdateVertexData(); + bfres.BFRESRender.UpdateTextureMaps(); + } + viewport.AddDrawable(new GL_EditorFramework.EditorDrawables.SingleObject(new OpenTK.Vector3(0))); + + viewport.LoadObjects(); + objectCB.Items.Add("Scene"); objectCB.SelectedIndex = 0; - if (scene.LapPaths.Count > 0) - { + if (scene.LapPaths.Count > 0) { objectCB.Items.Add("Lap Paths"); foreach (var group in scene.LapPaths) { foreach (var path in group.PathPoints) { - Console.WriteLine(path.Translate); - Console.WriteLine(path.Rotate); - Console.WriteLine(path.Scale); - viewport.AddDrawable(path.RenderablePoint); } } diff --git a/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll b/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll index 763c9877..9ead0aba 100644 Binary files a/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll and b/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index 8b27e9fa..3dcc1be7 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll index ab37cd66..10ce85f3 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb index e21cd676..2a93cba9 100644 Binary files a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb and b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.pdb differ diff --git a/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll b/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll index e6c2d4d1..40c79ab2 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll and b/Switch_FileFormatsMain/obj/Release/Interop.WMPLib.dll differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 584e98e2..2e32bc0a 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache differ diff --git a/Toolbox/Gl_EditorFramework.dll b/Toolbox/Gl_EditorFramework.dll index 4a1ba4d5..ad7ddfbe 100644 Binary files a/Toolbox/Gl_EditorFramework.dll and b/Toolbox/Gl_EditorFramework.dll differ diff --git a/Toolbox/Gl_EditorFramework.pdb b/Toolbox/Gl_EditorFramework.pdb index 9d0cd56b..1c38f996 100644 Binary files a/Toolbox/Gl_EditorFramework.pdb and b/Toolbox/Gl_EditorFramework.pdb differ