diff --git a/.gitignore b/.gitignore index 5faedd58..482addce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .vs/Switch_Toolbox/v15/Server/sqlite3/db.lock +*NodeEditorWinforms-master *.resources Debug/ Release/ \ No newline at end of file diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index a6fbfd66..23d1199a 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 91f66f91..c608334a 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-shm b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm index c9b51a83..b1cf943f 100644 Binary files a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm and b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-shm differ diff --git a/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal b/.vs/Switch_Toolbox/v15/Server/sqlite3/storage.ide-wal index 64c75551..bf5224fa 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.zip b/Switch_FileFormatsMain.zip new file mode 100644 index 00000000..cef268b6 Binary files /dev/null and b/Switch_FileFormatsMain.zip differ diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs index 3b5b2d88..c04d27a1 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/Bfres Structs/SubFiles/FMDL/FSKL.cs @@ -31,6 +31,16 @@ namespace Bfres.Structs return matrices; } + public void AddBone(Bone bone) + { + node.Skeleton.Bones.Add(bone); + } + + public void AddBone(ResU.Bone bone) + { + node.SkeletonU.Bones.Add(bone.Name, bone); + } + public class fsklNode : STGenericWrapper { public FSKL fskl; @@ -68,6 +78,31 @@ namespace Bfres.Structs ContextMenuStrip.Items.Add(new ToolStripMenuItem("Clear All Bones", null, ClearAction, Keys.Control | Keys.C)); } + public override void Replace(string FileName) + { + string extension = System.IO.Path.GetExtension(FileName); + + if (extension == ".bfskl") + { + if (SkeletonU != null) + { + SkeletonU = new ResU.Skeleton(); + SkeletonU.Import(FileName, GetResFileU()); + Nodes.Clear(); + fskl.bones.Clear(); + BfresWiiU.ReadSkeleton(this, SkeletonU, fskl); + } + else + { + Skeleton = new Skeleton(); + Skeleton.Import(FileName); + Nodes.Clear(); + fskl.bones.Clear(); + BfresSwitch.ReadSkeleton(this, Skeleton, fskl); + } + } + } + public ResFile GetResFile() { return ((BFRESGroupNode)Parent).GetResFile(); @@ -124,11 +159,6 @@ namespace Bfres.Structs Skeleton.Export(FileName, ((FMDL)Parent).GetResFile()); } - public override void Replace(string FileName) - { - Skeleton.Export(FileName, ((FMDL)Parent).GetResFile()); - } - public override void OnClick(TreeView treeView) { UpdateEditor(); @@ -154,11 +184,30 @@ namespace Bfres.Structs node = new fsklNode(); node.fskl = this; node.SkeletonU = skl; - BfresWiiU.SetSkeleton(node, skl, this); + BfresWiiU.ReadSkeleton(node, skl, this); } } public class BfresBone : STBone { + public bool UseSmoothMatrix { get; set; } + + public bool UseRigidMatrix { get; set; } + + public string BoneName + { + get + { + if (BoneU != null) return BoneU.Name; + else return Bone.Name; + } + set + { + if (BoneU != null) BoneU.Name = value; + else Bone.Name = value; + Text = value; + } + } + public bool FlagVisible = true; public ResU.ResDict UserDataU; @@ -179,6 +228,7 @@ namespace Bfres.Structs SelectedImageKey = "bone"; ContextMenuStrip = new STContextMenuStrip(); + ContextMenuStrip.Items.Add(new ToolStripMenuItem("Rename", null, RenameAction, Keys.Control | Keys.I)); ContextMenuStrip.Items.Add(new ToolStripMenuItem("New Child Bone", null, NewAction, Keys.Control | Keys.I)); ContextMenuStrip.Items.Add(new ToolStripMenuItem("Import Child Bone", null, ImportAction, Keys.Control | Keys.I)); ContextMenuStrip.Items.Add(new ToolStripSeparator()); @@ -190,7 +240,16 @@ namespace Bfres.Structs protected void ImportAction(object sender, EventArgs args) { ImportChild(); } protected void ReplaceAction(object sender, EventArgs args) { Replace(); } protected void NewAction(object sender, EventArgs args) { NewChild(); } - + protected void RenameAction(object sender, EventArgs args) { Rename(); } + + public void Rename() + { + RenameDialog dialog = new RenameDialog(); + dialog.SetString(Text); + + if (dialog.ShowDialog() == DialogResult.OK) { BoneName = dialog.textBox1.Text; } + } + public void CloneBaseInstance(STBone genericBone) { Text = genericBone.Text; @@ -283,6 +342,9 @@ namespace Bfres.Structs BfresWiiU.ReadBone(bn, BoneU, false); Nodes.Add(bn); skeletonParent.bones.Add(bn); + + BoneU.ParentIndex = (ushort)bn.parentIndex; + ((FSKL)skeletonParent).AddBone(BoneU); } else { @@ -290,8 +352,11 @@ namespace Bfres.Structs Bone.Name = CheckDuplicateBoneNames("NewBone"); BfresSwitch.ReadBone(bn, Bone, false); + Nodes.Add(bn); skeletonParent.bones.Add(bn); + + ((FSKL)skeletonParent).AddBone(Bone); } } @@ -314,6 +379,7 @@ namespace Bfres.Structs BfresWiiU.ReadBone(bn, BoneU, false); Nodes.Add(bn); skeletonParent.bones.Add(bn); + ((FSKL)skeletonParent).AddBone(BoneU); } else { @@ -324,6 +390,7 @@ namespace Bfres.Structs BfresSwitch.ReadBone(bn, Bone, false); Nodes.Add(bn); skeletonParent.bones.Add(bn); + ((FSKL)skeletonParent).AddBone(Bone); } } } diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BfresSwitch.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BfresSwitch.cs index 8b9c0c30..541804bb 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BfresSwitch.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BfresSwitch.cs @@ -54,6 +54,8 @@ namespace FirstPlugin { var mat = MatrixExenstion.GetMatrixInverted(bone); + bn.ParentIndex = (ushort)bone.parentIndex; + if (bn.SmoothMatrixIndex > -1) model.Skeleton.InverseModelMatrices[bn.SmoothMatrixIndex] = mat; } diff --git a/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs index 1aa64f6a..7e359d97 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BfresWiiU.cs @@ -309,7 +309,7 @@ namespace FirstPlugin return attd.Data; } - public static void SetSkeleton(this TreeNodeCustom skl, Skeleton skeleton, FSKL RenderableSkeleton) + public static void ReadSkeleton(this TreeNodeCustom skl, Skeleton skeleton, FSKL RenderableSkeleton) { if (skeleton.MatrixToBoneList == null) skeleton.MatrixToBoneList = new List(); diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/NewFolder1/SamplerEditor.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/NewFolder1/SamplerEditor.Designer.cs index 35a7cb32..68066430 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/NewFolder1/SamplerEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/NewFolder1/SamplerEditor.Designer.cs @@ -536,7 +536,7 @@ this.textureBP.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.textureBP.BackColor = System.Drawing.Color.Transparent; + this.textureBP.BackColor = System.Drawing.Color.Empty; this.textureBP.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("textureBP.BackgroundImage"))); this.textureBP.Location = new System.Drawing.Point(14, 146); this.textureBP.MinimumSize = new System.Drawing.Size(280, 365); diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderAssign/ShaderOptionsEditor.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderAssign/ShaderOptionsEditor.Designer.cs index 3693c1da..aa0948eb 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderAssign/ShaderOptionsEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderAssign/ShaderOptionsEditor.Designer.cs @@ -122,7 +122,7 @@ // ovlColumn1 // this.ovlColumn1.AspectName = "Name"; - this.ovlColumn1.HeaderForeColor = System.Drawing.Color.Transparent; + this.ovlColumn1.HeaderForeColor = System.Drawing.Color.Empty; this.ovlColumn1.Text = "Name"; this.ovlColumn1.Width = 170; // diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ColorWheel.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ColorWheel.cs index 064d0e31..ac12e75e 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ColorWheel.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/ColorWheel.cs @@ -20,7 +20,7 @@ namespace FirstPlugin.Forms private void ColorWheel_Paint(object sender, PaintEventArgs e) { - DrawColorWheel(e.Graphics, Color.Transparent, 0, 0, ClientSize.Width, ClientSize.Height); + DrawColorWheel(e.Graphics, Color.Empty, 0, 0, ClientSize.Width, ClientSize.Height); } private void DrawColorWheel(Graphics gr, Color outline_color, diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs index 1275ea5c..4f27e432 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector3SliderPanel.cs @@ -16,7 +16,7 @@ namespace FirstPlugin.Forms if (IsColor) return pictureBox1.BackColor; else - return Color.Transparent; + return Color.Empty; } public vector3SliderPanel(string UniformName, float[] values, BfresShaderParam param) diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs index 7fb0d18d..94c33b60 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/ShaderParams/vector4SliderPanel.cs @@ -15,7 +15,7 @@ namespace FirstPlugin.Forms if (IsColor) return colorPB.BackColor; else - return Color.Transparent; + return Color.Empty; } public Color GetAlphaColor() @@ -23,7 +23,7 @@ namespace FirstPlugin.Forms if (IsColor) return alphaPB.BackColor; else - return Color.Transparent; + return Color.Empty; } public vector4SliderPanel(string UniformName, float[] values, BfresShaderParam param) diff --git a/Switch_FileFormatsMain/GUI/BFRES/Materials/Texture Selector.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Materials/Texture Selector.Designer.cs index 1d4bff8a..24648e6c 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Materials/Texture Selector.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Materials/Texture Selector.Designer.cs @@ -43,7 +43,7 @@ // // pictureBoxCustom1 // - this.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxCustom1.BackColor = System.Drawing.Color.Empty; this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage"))); this.pictureBoxCustom1.Location = new System.Drawing.Point(252, 25); this.pictureBoxCustom1.Name = "pictureBoxCustom1"; diff --git a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.Designer.cs index 633b4bc4..ff70fe32 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.Designer.cs @@ -155,6 +155,8 @@ this.stFlowLayoutPanel1.Controls.Add(this.stDropDownPanel5); this.stFlowLayoutPanel1.Controls.Add(this.stDropDownPanel6); this.stFlowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.stFlowLayoutPanel1.FixedHeight = false; + this.stFlowLayoutPanel1.FixedWidth = true; this.stFlowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown; this.stFlowLayoutPanel1.Location = new System.Drawing.Point(3, 3); this.stFlowLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); @@ -175,8 +177,8 @@ this.stDropDownPanel1.PanelName = "Bone Info"; this.stDropDownPanel1.PanelValueName = ""; this.stDropDownPanel1.SetIcon = null; - this.stDropDownPanel1.SetIconAlphaColor = System.Drawing.Color.Transparent; - this.stDropDownPanel1.SetIconColor = System.Drawing.Color.Transparent; + this.stDropDownPanel1.SetIconAlphaColor = System.Drawing.Color.Empty; + this.stDropDownPanel1.SetIconColor = System.Drawing.Color.Empty; this.stDropDownPanel1.Size = new System.Drawing.Size(633, 113); this.stDropDownPanel1.TabIndex = 0; // @@ -186,6 +188,7 @@ this.boneInfoPanel1.Name = "boneInfoPanel1"; this.boneInfoPanel1.Size = new System.Drawing.Size(604, 87); this.boneInfoPanel1.TabIndex = 1; + this.boneInfoPanel1.Load += new System.EventHandler(this.boneInfoPanel1_Load); // // stDropDownPanel2 // @@ -199,8 +202,8 @@ this.stDropDownPanel2.PanelName = "Transform"; this.stDropDownPanel2.PanelValueName = ""; this.stDropDownPanel2.SetIcon = null; - this.stDropDownPanel2.SetIconAlphaColor = System.Drawing.Color.Transparent; - this.stDropDownPanel2.SetIconColor = System.Drawing.Color.Transparent; + this.stDropDownPanel2.SetIconAlphaColor = System.Drawing.Color.Empty; + this.stDropDownPanel2.SetIconColor = System.Drawing.Color.Empty; this.stDropDownPanel2.Size = new System.Drawing.Size(633, 151); this.stDropDownPanel2.TabIndex = 1; // @@ -627,8 +630,8 @@ this.stDropDownPanel3.PanelName = "Billboard"; this.stDropDownPanel3.PanelValueName = ""; this.stDropDownPanel3.SetIcon = null; - this.stDropDownPanel3.SetIconAlphaColor = System.Drawing.Color.Transparent; - this.stDropDownPanel3.SetIconColor = System.Drawing.Color.Transparent; + this.stDropDownPanel3.SetIconAlphaColor = System.Drawing.Color.Empty; + this.stDropDownPanel3.SetIconColor = System.Drawing.Color.Empty; this.stDropDownPanel3.Size = new System.Drawing.Size(633, 95); this.stDropDownPanel3.TabIndex = 2; // @@ -703,8 +706,8 @@ this.stDropDownPanel4.PanelName = "Matricies"; this.stDropDownPanel4.PanelValueName = ""; this.stDropDownPanel4.SetIcon = null; - this.stDropDownPanel4.SetIconAlphaColor = System.Drawing.Color.Transparent; - this.stDropDownPanel4.SetIconColor = System.Drawing.Color.Transparent; + this.stDropDownPanel4.SetIconAlphaColor = System.Drawing.Color.Empty; + this.stDropDownPanel4.SetIconColor = System.Drawing.Color.Empty; this.stDropDownPanel4.Size = new System.Drawing.Size(633, 95); this.stDropDownPanel4.TabIndex = 3; // @@ -795,7 +798,7 @@ this.stDropDownPanel5.PanelName = "Transform Modes"; this.stDropDownPanel5.PanelValueName = ""; this.stDropDownPanel5.SetIcon = null; - this.stDropDownPanel5.SetIconAlphaColor = System.Drawing.Color.Transparent; + this.stDropDownPanel5.SetIconAlphaColor = System.Drawing.Color.Empty; this.stDropDownPanel5.SetIconColor = System.Drawing.Color.Transparent; this.stDropDownPanel5.Size = new System.Drawing.Size(633, 136); this.stDropDownPanel5.TabIndex = 4; diff --git a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.cs b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.cs index bd458d00..1b556bfe 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BfresBoneEditor.cs @@ -200,5 +200,10 @@ namespace FirstPlugin SetBoneTransform(activeBone); } } + + private void boneInfoPanel1_Load(object sender, EventArgs e) + { + + } } } diff --git a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.Designer.cs index 08d0eca9..90d3d354 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.Designer.cs @@ -49,6 +49,7 @@ this.nameTB.Name = "nameTB"; this.nameTB.Size = new System.Drawing.Size(227, 20); this.nameTB.TabIndex = 0; + this.nameTB.TextChanged += new System.EventHandler(this.nameTB_TextChanged); // // stLabel1 // diff --git a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.cs b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.cs index fc28361c..5df915a4 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/Skeleton/BoneInfoPanel.cs @@ -36,12 +36,16 @@ namespace FirstPlugin nameIndexUD.Value = bn.GetIndex(); - - nameTB.Bind(bn, "Text"); + nameTB.Bind(bn, "BoneName"); parentIndexUD.Bind(bn, "parentIndex"); visibleChk.Bind(bn, "IsVisible"); Loaded = true; } + + private void nameTB_TextChanged(object sender, EventArgs e) + { + + } } } diff --git a/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/BfresTexturePatternEditor.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/BfresTexturePatternEditor.Designer.cs index e61b076c..a6db0ead 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/BfresTexturePatternEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/BfresTexturePatternEditor.Designer.cs @@ -274,7 +274,7 @@ this.pictureBoxCustom1.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.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxCustom1.BackColor = System.Drawing.Color.Empty; this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage"))); this.pictureBoxCustom1.Location = new System.Drawing.Point(6, 102); this.pictureBoxCustom1.Name = "pictureBoxCustom1"; @@ -339,7 +339,7 @@ // this.animationTrackBar.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.animationTrackBar.BackColor = System.Drawing.Color.Transparent; + this.animationTrackBar.BackColor = System.Drawing.Color.Empty; this.animationTrackBar.BarInnerColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.animationTrackBar.BarPenColorBottom = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); this.animationTrackBar.BarPenColorTop = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64))))); diff --git a/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/FrameTextureThumbnail.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/FrameTextureThumbnail.Designer.cs index 20697ed0..39be3df1 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/FrameTextureThumbnail.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/TexturePattern/FrameTextureThumbnail.Designer.cs @@ -42,7 +42,7 @@ this.pictureBoxCustom1.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.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxCustom1.BackColor = System.Drawing.Color.Empty; this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage"))); this.pictureBoxCustom1.Location = new System.Drawing.Point(0, 0); this.pictureBoxCustom1.Name = "pictureBoxCustom1"; diff --git a/Switch_FileFormatsMain/GUI/Editors/MK8TrackEditor/MK8MapCameraEditor.Designer.cs b/Switch_FileFormatsMain/GUI/Editors/MK8TrackEditor/MK8MapCameraEditor.Designer.cs index a6482238..92f92d90 100644 --- a/Switch_FileFormatsMain/GUI/Editors/MK8TrackEditor/MK8MapCameraEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/Editors/MK8TrackEditor/MK8MapCameraEditor.Designer.cs @@ -63,7 +63,7 @@ this.pictureBoxCustom1.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.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxCustom1.BackColor = System.Drawing.Color.Empty; this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage"))); this.pictureBoxCustom1.Location = new System.Drawing.Point(3, 56); this.pictureBoxCustom1.Name = "pictureBoxCustom1"; diff --git a/Switch_FileFormatsMain/GUI/Editors/PTCL/EmitterEditor.Designer.cs b/Switch_FileFormatsMain/GUI/Editors/PTCL/EmitterEditor.Designer.cs index b41cc4b6..8b4abb8b 100644 --- a/Switch_FileFormatsMain/GUI/Editors/PTCL/EmitterEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/Editors/PTCL/EmitterEditor.Designer.cs @@ -104,7 +104,7 @@ // // color1Index0 // - this.color1Index0.BackColor = System.Drawing.Color.Transparent; + this.color1Index0.BackColor = System.Drawing.Color.Empty; this.color1Index0.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index0.Location = new System.Drawing.Point(181, 46); this.color1Index0.Name = "color1Index0"; @@ -116,7 +116,7 @@ // // color0Index0 // - this.color0Index0.BackColor = System.Drawing.Color.Transparent; + this.color0Index0.BackColor = System.Drawing.Color.Empty; this.color0Index0.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index0.Location = new System.Drawing.Point(6, 46); this.color0Index0.Name = "color0Index0"; @@ -128,7 +128,7 @@ // // color0Index1 // - this.color0Index1.BackColor = System.Drawing.Color.Transparent; + this.color0Index1.BackColor = System.Drawing.Color.Empty; this.color0Index1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index1.Location = new System.Drawing.Point(6, 102); this.color0Index1.Name = "color0Index1"; @@ -140,7 +140,7 @@ // // color1Index1 // - this.color1Index1.BackColor = System.Drawing.Color.Transparent; + this.color1Index1.BackColor = System.Drawing.Color.Empty; this.color1Index1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index1.Location = new System.Drawing.Point(181, 102); this.color1Index1.Name = "color1Index1"; @@ -152,7 +152,7 @@ // // color0Index3 // - this.color0Index3.BackColor = System.Drawing.Color.Transparent; + this.color0Index3.BackColor = System.Drawing.Color.Empty; this.color0Index3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index3.Location = new System.Drawing.Point(6, 214); this.color0Index3.Name = "color0Index3"; @@ -164,7 +164,7 @@ // // color1Index3 // - this.color1Index3.BackColor = System.Drawing.Color.Transparent; + this.color1Index3.BackColor = System.Drawing.Color.Empty; this.color1Index3.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index3.Location = new System.Drawing.Point(181, 214); this.color1Index3.Name = "color1Index3"; @@ -176,7 +176,7 @@ // // color0Index2 // - this.color0Index2.BackColor = System.Drawing.Color.Transparent; + this.color0Index2.BackColor = System.Drawing.Color.Empty; this.color0Index2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index2.Location = new System.Drawing.Point(6, 158); this.color0Index2.Name = "color0Index2"; @@ -188,7 +188,7 @@ // // color1Index2 // - this.color1Index2.BackColor = System.Drawing.Color.Transparent; + this.color1Index2.BackColor = System.Drawing.Color.Empty; this.color1Index2.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index2.Location = new System.Drawing.Point(181, 158); this.color1Index2.Name = "color1Index2"; @@ -200,7 +200,7 @@ // // color0Index7 // - this.color0Index7.BackColor = System.Drawing.Color.Transparent; + this.color0Index7.BackColor = System.Drawing.Color.Empty; this.color0Index7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index7.Location = new System.Drawing.Point(6, 438); this.color0Index7.Name = "color0Index7"; @@ -212,7 +212,7 @@ // // color1Index7 // - this.color1Index7.BackColor = System.Drawing.Color.Transparent; + this.color1Index7.BackColor = System.Drawing.Color.Empty; this.color1Index7.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index7.Location = new System.Drawing.Point(181, 438); this.color1Index7.Name = "color1Index7"; @@ -224,7 +224,7 @@ // // color0Index6 // - this.color0Index6.BackColor = System.Drawing.Color.Transparent; + this.color0Index6.BackColor = System.Drawing.Color.Empty; this.color0Index6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index6.Location = new System.Drawing.Point(6, 382); this.color0Index6.Name = "color0Index6"; @@ -236,7 +236,7 @@ // // color1Index6 // - this.color1Index6.BackColor = System.Drawing.Color.Transparent; + this.color1Index6.BackColor = System.Drawing.Color.Empty; this.color1Index6.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index6.Location = new System.Drawing.Point(181, 382); this.color1Index6.Name = "color1Index6"; @@ -248,7 +248,7 @@ // // color0Index5 // - this.color0Index5.BackColor = System.Drawing.Color.Transparent; + this.color0Index5.BackColor = System.Drawing.Color.Empty; this.color0Index5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index5.Location = new System.Drawing.Point(6, 326); this.color0Index5.Name = "color0Index5"; @@ -260,7 +260,7 @@ // // color1Index5 // - this.color1Index5.BackColor = System.Drawing.Color.Transparent; + this.color1Index5.BackColor = System.Drawing.Color.Empty; this.color1Index5.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index5.Location = new System.Drawing.Point(181, 326); this.color1Index5.Name = "color1Index5"; @@ -272,7 +272,7 @@ // // color0Index4 // - this.color0Index4.BackColor = System.Drawing.Color.Transparent; + this.color0Index4.BackColor = System.Drawing.Color.Empty; this.color0Index4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color0Index4.Location = new System.Drawing.Point(6, 270); this.color0Index4.Name = "color0Index4"; @@ -284,7 +284,7 @@ // // color1Index4 // - this.color1Index4.BackColor = System.Drawing.Color.Transparent; + this.color1Index4.BackColor = System.Drawing.Color.Empty; this.color1Index4.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.color1Index4.Location = new System.Drawing.Point(181, 270); this.color1Index4.Name = "color1Index4"; @@ -408,7 +408,7 @@ // // pictureBox2 // - this.pictureBox2.BackColor = System.Drawing.Color.Transparent; + this.pictureBox2.BackColor = System.Drawing.Color.Empty; this.pictureBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.BackgroundImage"))); this.pictureBox2.Location = new System.Drawing.Point(14, 192); this.pictureBox2.Name = "pictureBox2"; @@ -419,7 +419,7 @@ // // pictureBox3 // - this.pictureBox3.BackColor = System.Drawing.Color.Transparent; + this.pictureBox3.BackColor = System.Drawing.Color.Empty; this.pictureBox3.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox3.BackgroundImage"))); this.pictureBox3.Location = new System.Drawing.Point(14, 361); this.pictureBox3.Name = "pictureBox3"; @@ -430,7 +430,7 @@ // // pictureBox1 // - this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackColor = System.Drawing.Color.Empty; this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage"))); this.pictureBox1.Location = new System.Drawing.Point(14, 41); this.pictureBox1.Name = "pictureBox1"; diff --git a/Switch_FileFormatsMain/GUI/Editors/TexturePatternAnimEditor.Designer.cs b/Switch_FileFormatsMain/GUI/Editors/TexturePatternAnimEditor.Designer.cs index e46dbc69..4ee986ae 100644 --- a/Switch_FileFormatsMain/GUI/Editors/TexturePatternAnimEditor.Designer.cs +++ b/Switch_FileFormatsMain/GUI/Editors/TexturePatternAnimEditor.Designer.cs @@ -143,7 +143,7 @@ // this.stPanel4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.stPanel4.BackColor = System.Drawing.Color.Transparent; + this.stPanel4.BackColor = System.Drawing.Color.Empty; this.stPanel4.Controls.Add(this.btnStop); this.stPanel4.Controls.Add(this.btnForward1); this.stPanel4.Controls.Add(this.btnPlay); @@ -247,7 +247,7 @@ this.pictureBoxCustom1.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.pictureBoxCustom1.BackColor = System.Drawing.Color.Transparent; + this.pictureBoxCustom1.BackColor = System.Drawing.Color.Empty; this.pictureBoxCustom1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBoxCustom1.BackgroundImage"))); this.pictureBoxCustom1.Location = new System.Drawing.Point(167, 3); this.pictureBoxCustom1.Name = "pictureBoxCustom1"; diff --git a/Switch_FileFormatsMain/GUI/TextureUI/Importers/BinaryTextureImporterList.Designer.cs b/Switch_FileFormatsMain/GUI/TextureUI/Importers/BinaryTextureImporterList.Designer.cs index 2b0861ca..a8142d90 100644 --- a/Switch_FileFormatsMain/GUI/TextureUI/Importers/BinaryTextureImporterList.Designer.cs +++ b/Switch_FileFormatsMain/GUI/TextureUI/Importers/BinaryTextureImporterList.Designer.cs @@ -206,7 +206,7 @@ // // pictureBox1 // - this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackColor = System.Drawing.Color.Empty; this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage"))); this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left; this.pictureBox1.Location = new System.Drawing.Point(237, 0); diff --git a/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs b/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs index 7c1e4ba1..af38d18f 100644 --- a/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs +++ b/Switch_FileFormatsMain/GUI/TextureUI/Importers/GTXTextureImporter.cs @@ -390,7 +390,7 @@ namespace FirstPlugin // // pictureBox1 // - this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.BackColor = System.Drawing.Color.Empty; this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage"))); this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Left; this.pictureBox1.Location = new System.Drawing.Point(237, 0); diff --git a/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll b/Switch_FileFormatsMain/obj/Release/AxInterop.WMPLib.dll index 2286bc88..17cb797c 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 75757d58..dfb8b496 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 3478313f..14d9601b 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 3609e569..c17f9ad0 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 7f432796..b66b7a7b 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.csproj.GenerateResource.cache b/Switch_FileFormatsMain/obj/Release/Switch_FileFormatsMain.csproj.GenerateResource.cache index 03257bd0..237ca688 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 f9d2d322..bccb9ae1 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 3ff3ef2c..9d646458 100644 --- a/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs +++ b/Switch_Toolbox_Library/FileFormats/Assimp/Assimp.cs @@ -577,7 +577,7 @@ namespace Switch_Toolbox.Library if (ext == ".ply") formatID = "ply"; - if (v.ExportFile(scene, FileName, formatID, PostProcessSteps.FlipUVs | PostProcessSteps.ValidateDataStructure)) + if (v.ExportFile(scene, FileName, formatID, PostProcessSteps.ValidateDataStructure)) MessageBox.Show($"Exported {FileName} Successfuly!"); else MessageBox.Show($"Failed to export {FileName}!"); diff --git a/Switch_Toolbox_Library/Forms/Custom/FlatTabControl/FlatTabControl.cs b/Switch_Toolbox_Library/Forms/Custom/FlatTabControl/FlatTabControl.cs index 41a25a02..4632078c 100644 --- a/Switch_Toolbox_Library/Forms/Custom/FlatTabControl/FlatTabControl.cs +++ b/Switch_Toolbox_Library/Forms/Custom/FlatTabControl/FlatTabControl.cs @@ -31,13 +31,15 @@ namespace FlatTabControl private bool bUpDown; // true when the button UpDown is required private ImageList leftRightImages = null; private const int nMargin = 5; - private Color mBackColor = Color.Transparent; - private Color mShadowColor = Color.Transparent; + private Color mBackColor = Color.Empty; + private Color mShadowColor = Color.Empty; public FlatTabControl() { - // This call is required by the Windows.Forms Form Designer. - InitializeComponent(); + myBackColor = FormThemes.BaseTheme.FormBackColor; + + // This call is required by the Windows.Forms Form Designer. + InitializeComponent(); // double buffering this.SetStyle(ControlStyles.UserPaint, true); @@ -46,7 +48,6 @@ namespace FlatTabControl this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.SupportsTransparentBackColor, true); - myBackColor = FormThemes.BaseTheme.FormBackColor; bUpDown = false; diff --git a/Switch_Toolbox_Library/Generics/GenericObject.cs b/Switch_Toolbox_Library/Generics/GenericObject.cs index 0c39b881..1e6bf1a1 100644 --- a/Switch_Toolbox_Library/Generics/GenericObject.cs +++ b/Switch_Toolbox_Library/Generics/GenericObject.cs @@ -220,7 +220,7 @@ namespace Switch_Toolbox.Library private void CalculateTanBitanArrays(List faces, Vector3[] tanArray, Vector3[] bitanArray, bool UseUVLayer2) { - if (vertices.Count < 3) + if (vertices.Count < 3 || lodMeshes.Count <= 0) return; for (int i = 0; i < lodMeshes[DisplayLODIndex].displayFaceSize; i += 3) diff --git a/Switch_Toolbox_Library/IO/CompressionMenus.cs b/Switch_Toolbox_Library/IO/CompressionMenus.cs index 2c537e1b..d0293cd6 100644 --- a/Switch_Toolbox_Library/IO/CompressionMenus.cs +++ b/Switch_Toolbox_Library/IO/CompressionMenus.cs @@ -76,8 +76,6 @@ namespace Switch_Toolbox.Library.IO public void CompressData(CompressionType CompressionType, byte[] data) { - MessageBox.Show(data.Length.ToString()); - switch (CompressionType) { case CompressionType.Yaz0: diff --git a/Switch_Toolbox_Library/IO/FileIO.cs b/Switch_Toolbox_Library/IO/FileIO.cs index f6326722..6ef6bbc4 100644 --- a/Switch_Toolbox_Library/IO/FileIO.cs +++ b/Switch_Toolbox_Library/IO/FileIO.cs @@ -442,7 +442,6 @@ namespace Switch_Toolbox.Library.IO using (var source = LZ4Stream.Decode(new MemoryStream(data))) { source.CopyTo(mem); - mem.Write(data, 0, data.Length); } return mem.ToArray(); } @@ -452,12 +451,8 @@ namespace Switch_Toolbox.Library.IO var stream = new MemoryStream(); using (var writer = new FileWriter(stream)) { - writer.Write(data.Length); - - - MessageBox.Show(data.Length.ToString()); - byte[] buffer = LZ4.Frame.LZ4Frame.Compress(new MemoryStream(data), LZ4.Frame.LZ4MaxBlockSize.Auto, true, true, false, false, true); + byte[] buffer = LZ4.Frame.LZ4Frame.Compress(new MemoryStream(data), LZ4.Frame.LZ4MaxBlockSize.Auto, true, true, false, true, false); writer.Write(buffer, 0, buffer.Length); } return stream.ToArray(); diff --git a/Switch_Toolbox_Library/Runtime.cs b/Switch_Toolbox_Library/Runtime.cs index b3913327..e4908568 100644 --- a/Switch_Toolbox_Library/Runtime.cs +++ b/Switch_Toolbox_Library/Runtime.cs @@ -68,7 +68,7 @@ namespace Switch_Toolbox.Library public static bool UseDebugDomainExceptionHandler; public static bool DisableUpdatePrompt; - public static bool MaximizeMdiWindow = false; + public static bool MaximizeMdiWindow = true; public static GridSettings gridSettings = new GridSettings(); public class GridSettings