diff --git a/.vs/Switch_Toolbox/v15/.suo b/.vs/Switch_Toolbox/v15/.suo index ce39c6b2..6a971f7d 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 f6f5c328..c9686571 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 a946d049..2a0a8eb4 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/BFRESGroupNode.cs b/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroupNode.cs index e536b9b0..90cc44d1 100644 --- a/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroupNode.cs +++ b/Switch_FileFormatsMain/FileFormats/BFRES/BFRESGroupNode.cs @@ -126,6 +126,7 @@ namespace Bfres.Structs boneAnim.FlagsBase |= ResU.BoneAnimFlagsBase.Scale; boneAnim.ApplyScaleOne = false; boneAnim.ApplyScaleUniform = false; + boneAnim.ApplySegmentScaleCompensate = form.SegmentScaleCompensate; baseData.Scale = new Syroot.Maths.Vector3F(form.ScaleX, form.ScaleY, form.ScaleZ); } @@ -145,6 +146,7 @@ namespace Bfres.Structs boneAnim.FlagsBase |= ResNX.BoneAnimFlagsBase.Scale; boneAnim.ApplyScaleOne = false; boneAnim.ApplyScaleUniform = false; + boneAnim.ApplySegmentScaleCompensate = form.SegmentScaleCompensate; baseData.Scale = new Syroot.Maths.Vector3F(form.ScaleX, form.ScaleY, form.ScaleZ); } diff --git a/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.Designer.cs b/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.Designer.cs index 4c17b028..d4192e48 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.Designer.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.Designer.cs @@ -37,6 +37,7 @@ this.scaleYUD = new Switch_Toolbox.Library.Forms.STNumbericUpDown(); this.scaleZUD = new Switch_Toolbox.Library.Forms.STNumbericUpDown(); this.stButton1 = new Switch_Toolbox.Library.Forms.STButton(); + this.scaleCompChk = new Switch_Toolbox.Library.Forms.STCheckBox(); this.contentContainer.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.scaleXUD)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.scaleYUD)).BeginInit(); @@ -45,6 +46,7 @@ // // contentContainer // + this.contentContainer.Controls.Add(this.scaleCompChk); this.contentContainer.Controls.Add(this.stButton1); this.contentContainer.Controls.Add(this.scaleZUD); this.contentContainer.Controls.Add(this.scaleYUD); @@ -64,6 +66,7 @@ this.contentContainer.Controls.SetChildIndex(this.scaleYUD, 0); this.contentContainer.Controls.SetChildIndex(this.scaleZUD, 0); this.contentContainer.Controls.SetChildIndex(this.stButton1, 0); + this.contentContainer.Controls.SetChildIndex(this.scaleCompChk, 0); // // stLabel1 // @@ -85,6 +88,7 @@ this.boneListCB.ReadOnly = true; this.boneListCB.Size = new System.Drawing.Size(132, 21); this.boneListCB.TabIndex = 13; + this.boneListCB.SelectedIndexChanged += new System.EventHandler(this.boneListCB_SelectedIndexChanged); // // stLabel2 // @@ -161,6 +165,16 @@ this.stButton1.Text = "Ok"; this.stButton1.UseVisualStyleBackColor = false; // + // scaleCompChk + // + this.scaleCompChk.AutoSize = true; + this.scaleCompChk.Location = new System.Drawing.Point(165, 58); + this.scaleCompChk.Name = "scaleCompChk"; + this.scaleCompChk.Size = new System.Drawing.Size(160, 17); + this.scaleCompChk.TabIndex = 21; + this.scaleCompChk.Text = "Segment Scale Compensate"; + this.scaleCompChk.UseVisualStyleBackColor = true; + // // BatchEditBaseAnimDataForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -187,5 +201,6 @@ private Switch_Toolbox.Library.Forms.STComboBox boneListCB; private Switch_Toolbox.Library.Forms.STButton stButton1; private Switch_Toolbox.Library.Forms.STNumbericUpDown scaleZUD; + private Switch_Toolbox.Library.Forms.STCheckBox scaleCompChk; } } \ No newline at end of file diff --git a/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.cs b/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.cs index 1b841747..0a4c2219 100644 --- a/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.cs +++ b/Switch_FileFormatsMain/GUI/BFRES/BatchEditBaseAnimDataForm.cs @@ -20,6 +20,8 @@ namespace FirstPlugin public string TargetBone => boneListCB.GetSelectedText(); + public bool SegmentScaleCompensate => scaleCompChk.Checked; + public BatchEditBaseAnimDataForm() { InitializeComponent(); @@ -33,12 +35,25 @@ namespace FirstPlugin } } + private Animation activeAnim; + public void LoadAnim(Animation anim) { + activeAnim = anim; + foreach (var bone in anim.Bones) boneListCB.Items.Add(bone.Text); boneListCB.SelectedIndex = 0; } + + private void boneListCB_SelectedIndexChanged(object sender, EventArgs e) + { + if (activeAnim != null) + { + int index = boneListCB.SelectedIndex; + scaleCompChk.Checked = activeAnim.Bones[index].UseSegmentScaleCompensate; + } + } } } diff --git a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache index c6576fb9..37123d7c 100644 Binary files a/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache and b/Switch_FileFormatsMain/obj/Release/DesignTimeResolveAssemblyReferences.cache differ