diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index efca9c8c..4203ac5e 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 0d897321..66d27be3 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 1eb2e636..fc4250c8 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/BFRES/BFRES.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs index d46c43ea..83dee956 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BFRES.cs @@ -944,10 +944,10 @@ namespace FirstPlugin case BRESGroupType.SkeletalAnim: foreach (FSKA ska in group.Nodes) { - ska.SkeletalAnim.BoneAnims.Clear(); + // ska.SkeletalAnim.BoneAnims.Clear(); - foreach (FSKA.BoneAnimNode bone in ska.Bones) - ska.SkeletalAnim.BoneAnims.Add(bone.SaveData()); + // foreach (FSKA.BoneAnimNode bone in ska.Bones) + // ska.SkeletalAnim.BoneAnims.Add(bone.SaveData()); ska.SkeletalAnim.Name = ska.Text; resFile.SkeletalAnims.Add(ska.SkeletalAnim); diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs index 9846700e..b237e448 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL.cs @@ -867,7 +867,7 @@ namespace Bfres.Structs shape.vertexAttributes = settings.CreateNewAttributes(); shape.BoneIndex = obj.BoneIndex; - STConsole.WriteLine(Text + " " + obj.MaterialIndex); + MessageBox.Show(shape.vertexAttributes.Count.ToString()); if (UseMats) shape.MaterialIndex = obj.MaterialIndex + MatStartIndex; diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs index f5d07427..8bef9138 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSHP.cs @@ -745,7 +745,10 @@ namespace Bfres.Structs else { if (v.boneIds.Count < 4) + { + STConsole.WriteLine(defBn.Index + " mesh " + Text + " bone " + bn); v.boneIds.Add(defBn.Index); + } } } i++; diff --git a/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.Designer.cs index a8dfb2b1..1fb81aa9 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.Designer.cs @@ -552,6 +552,7 @@ this.chkBoxEnableWeightIndices.TabIndex = 25; this.chkBoxEnableWeightIndices.Text = "Enable Indices/Weights"; this.chkBoxEnableWeightIndices.UseVisualStyleBackColor = true; + this.chkBoxEnableWeightIndices.CheckedChanged += new System.EventHandler(this.chkBoxEnableAttribute_CheckedChanged); // // chkBoxEnableBitans // @@ -562,6 +563,7 @@ this.chkBoxEnableBitans.TabIndex = 24; this.chkBoxEnableBitans.Text = "Enable Bitangents"; this.chkBoxEnableBitans.UseVisualStyleBackColor = true; + this.chkBoxEnableBitans.CheckedChanged += new System.EventHandler(this.chkBoxEnableAttribute_CheckedChanged); // // chkBoxEnableTans // @@ -760,7 +762,7 @@ this.tabPageAdvanced.Location = new System.Drawing.Point(4, 25); this.tabPageAdvanced.Name = "tabPageAdvanced"; this.tabPageAdvanced.Padding = new System.Windows.Forms.Padding(3); - this.tabPageAdvanced.Size = new System.Drawing.Size(530, 333); + this.tabPageAdvanced.Size = new System.Drawing.Size(192, 71); this.tabPageAdvanced.TabIndex = 0; this.tabPageAdvanced.Text = "Advanced Settings"; // @@ -777,7 +779,7 @@ this.stPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.stPanel1.Location = new System.Drawing.Point(3, 3); this.stPanel1.Name = "stPanel1"; - this.stPanel1.Size = new System.Drawing.Size(524, 327); + this.stPanel1.Size = new System.Drawing.Size(186, 65); this.stPanel1.TabIndex = 17; // // BfresModelImportSettings diff --git a/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.cs b/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.cs index 5b5fc653..b99be684 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/BfresModelImportSettings.cs @@ -101,6 +101,19 @@ namespace FirstPlugin { List attribute = new List(); + Console.WriteLine($"EnablePositions {EnablePositions}"); + Console.WriteLine($"EnableNormals {EnableNormals}"); + Console.WriteLine($"EnableVertexColors {EnableVertexColors}"); + Console.WriteLine($"EnableUV0 {EnableUV0}"); + Console.WriteLine($"EnableUV1 {EnableUV1}"); + Console.WriteLine($"EnableUV2 {EnableUV2}"); + Console.WriteLine($"EnableUV2 {EnableUV2}"); + Console.WriteLine($"EnableTangents {EnableTangents}"); + Console.WriteLine($"EnableTangents {EnableTangents}"); + Console.WriteLine($"EnableBitangents {EnableBitangents}"); + Console.WriteLine($"EnableWeights {EnableWeights}"); + Console.WriteLine($"EnableIndices {EnableIndices}"); + if (EnablePositions) { FSHP.VertexAttribute att = new FSHP.VertexAttribute(); diff --git a/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.Designer.cs b/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.Designer.cs index 8e1b9cea..954bb001 100644 --- a/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/Byaml/ByamlEditor.Designer.cs @@ -46,6 +46,7 @@ this.stButton2 = new Switch_Toolbox.Library.Forms.STButton(); this.contentContainer.SuspendLayout(); this.contextMenuStrip1.SuspendLayout(); + this.stPanel1.SuspendLayout(); this.SuspendLayout(); // // contentContainer @@ -62,9 +63,9 @@ this.treeView1.BorderStyle = System.Windows.Forms.BorderStyle.None; this.treeView1.ContextMenuStrip = this.contextMenuStrip1; this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; - this.treeView1.Location = new System.Drawing.Point(0, 25); + this.treeView1.Location = new System.Drawing.Point(0, 0); this.treeView1.Name = "treeView1"; - this.treeView1.Size = new System.Drawing.Size(543, 368); + this.treeView1.Size = new System.Drawing.Size(543, 336); this.treeView1.TabIndex = 0; this.treeView1.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.BeforeExpand); // @@ -157,14 +158,15 @@ this.stPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); + this.stPanel1.Controls.Add(this.treeView1); this.stPanel1.Location = new System.Drawing.Point(0, 25); this.stPanel1.Name = "stPanel1"; this.stPanel1.Size = new System.Drawing.Size(543, 336); this.stPanel1.TabIndex = 11; - this.stPanel1.Controls.Add(this.treeView1); // // stButton1 // + this.stButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.stButton1.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.stButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.stButton1.Location = new System.Drawing.Point(465, 367); @@ -176,6 +178,7 @@ // // stButton2 // + this.stButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.stButton2.DialogResult = System.Windows.Forms.DialogResult.OK; this.stButton2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.stButton2.Location = new System.Drawing.Point(369, 367); @@ -196,6 +199,7 @@ this.Controls.SetChildIndex(this.contentContainer, 0); this.contentContainer.ResumeLayout(false); this.contextMenuStrip1.ResumeLayout(false); + this.stPanel1.ResumeLayout(false); this.ResumeLayout(false); } diff --git a/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll b/Switch_FileFormatsMain/obj/Release/FirstPlugin.Plg.dll index 2ea752b8..34c46285 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 6a233a7a..91f83eb8 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/Switch_FileFormatsMain.csproj.GenerateResource.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache index 7c2a5d0f..9875ef0d 100644 Binary files a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache and b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache differ diff --git a/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csprojAssemblyReference.cache index 7c480c53..c51401fe 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/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs b/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs index 392e300b..3aebbd01 100644 --- a/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs +++ b/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs @@ -345,6 +345,12 @@ namespace Switch_Toolbox.Library obj.boneList = GetBoneList(msh); obj.VertexSkinCount = (byte)GetVertexSkinCount(msh); + Console.WriteLine($"MESH {msh.Name}"); + Console.WriteLine($"HasUv0 {obj.HasUv0}"); + Console.WriteLine($"HasIndices {obj.HasIndices}"); + Console.WriteLine($"HasWeights {obj.HasWeights}"); + + STGenericObject.LOD_Mesh lod = new STGenericObject.LOD_Mesh(); lod.faces = GetFaces(msh); lod.IndexFormat = STIndexFormat.UInt16; @@ -446,6 +452,9 @@ namespace Switch_Toolbox.Library } if (msh.HasBones) { + STConsole.WriteLine(msh.Name + " HasBones " + msh.HasBones); + STConsole.WriteLine(msh.Name + " BoneCount " + msh.BoneCount); + for (int i = 0; i < msh.BoneCount; i++) { Bone bn = msh.Bones[i]; diff --git a/Toolbox/Lib/Syroot.NintenTools.Bfres.dll b/Toolbox/Lib/Syroot.NintenTools.Bfres.dll index c0281ac4..32af8ed5 100644 Binary files a/Toolbox/Lib/Syroot.NintenTools.Bfres.dll and b/Toolbox/Lib/Syroot.NintenTools.Bfres.dll differ diff --git a/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb b/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb index 5c8bac84..664d61ae 100644 Binary files a/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb and b/Toolbox/Lib/Syroot.NintenTools.Bfres.pdb differ diff --git a/Toolbox/MainForm.cs b/Toolbox/MainForm.cs index bfe93339..5b9339f1 100644 --- a/Toolbox/MainForm.cs +++ b/Toolbox/MainForm.cs @@ -128,7 +128,7 @@ namespace Toolbox DialogResult result; using (DialogCenteringService centeringService = new DialogCenteringService(this)) // center message box { - result = MessageBox.Show($"A new update is available {UpdateProgram.LatestRelease.TagName} {UpdateProgram.LatestRelease.Body}!" + + result = MessageBox.Show($"A new update is available {UpdateProgram.LatestRelease.TagName} \n\n{UpdateProgram.LatestRelease.Body}!" + $" Would you like to install it?", "Updater", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); } if (result == DialogResult.Yes)