2019-07-13 19:04:56 +00: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;
|
2019-07-16 21:35:21 +00:00
|
|
|
|
using Toolbox.Library.Forms;
|
|
|
|
|
using Toolbox.Library.Animations;
|
2019-07-13 19:04:56 +00: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();
|
|
|
|
|
|
2019-07-13 22:55:13 +00:00
|
|
|
|
public bool SegmentScaleCompensate => scaleCompChk.Checked;
|
|
|
|
|
|
2019-07-13 19:04:56 +00:00
|
|
|
|
public BatchEditBaseAnimDataForm()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool HasCustomScale
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return ScaleX != 1 || ScaleY != 1 || ScaleZ != 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-07-13 22:55:13 +00:00
|
|
|
|
private Animation activeAnim;
|
|
|
|
|
|
2019-07-13 19:04:56 +00:00
|
|
|
|
public void LoadAnim(Animation anim)
|
|
|
|
|
{
|
2019-07-13 22:55:13 +00:00
|
|
|
|
activeAnim = anim;
|
|
|
|
|
|
2019-07-13 19:04:56 +00:00
|
|
|
|
foreach (var bone in anim.Bones)
|
|
|
|
|
boneListCB.Items.Add(bone.Text);
|
|
|
|
|
|
|
|
|
|
boneListCB.SelectedIndex = 0;
|
|
|
|
|
}
|
2019-07-13 22:55:13 +00:00
|
|
|
|
|
|
|
|
|
private void boneListCB_SelectedIndexChanged(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
if (activeAnim != null)
|
|
|
|
|
{
|
|
|
|
|
int index = boneListCB.SelectedIndex;
|
|
|
|
|
scaleCompChk.Checked = activeAnim.Bones[index].UseSegmentScaleCompensate;
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-07-13 19:04:56 +00:00
|
|
|
|
}
|
|
|
|
|
}
|