1
0
mirror of synced 2024-12-01 02:27:22 +01:00
Switch-Toolbox/File_Format_Library/GUI/BFRES/BatchEditBaseAnimDataForm.cs

60 lines
1.5 KiB
C#
Raw Permalink Normal View History

2019-07-13 21:04:56 +02:00
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Toolbox.Library.Forms;
using Toolbox.Library.Animations;
2019-07-13 21:04:56 +02:00
namespace FirstPlugin
{
public partial class BatchEditBaseAnimDataForm : STForm
{
public float ScaleX => (float)scaleXUD.Value;
public float ScaleY => (float)scaleXUD.Value;
public float ScaleZ => (float)scaleXUD.Value;
public string TargetBone => boneListCB.GetSelectedText();
public bool SegmentScaleCompensate => scaleCompChk.Checked;
2019-07-13 21:04:56 +02:00
public BatchEditBaseAnimDataForm()
{
InitializeComponent();
}
public bool HasCustomScale
{
get
{
return ScaleX != 1 || ScaleY != 1 || ScaleZ != 1;
}
}
private Animation activeAnim;
2019-07-13 21:04:56 +02:00
public void LoadAnim(Animation anim)
{
activeAnim = anim;
2019-07-13 21:04:56 +02:00
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;
}
}
2019-07-13 21:04:56 +02:00
}
}