private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex == -1) { return; } Main_OMF.Anims.RemoveAt(listBox1.SelectedIndex); Main_OMF.AnimsParams.RemoveAt(listBox1.SelectedIndex); Main_OMF.RecalcAllAnimIndex(); Main_OMF.RecalcAnimNum(); UpdateList(); }
public void CopyAnims(AnimationsContainer omf_1, AnimationsContainer omf_2, List <string> list) { omf_1.RecalcAnimNum(); short new_count = (short)omf_1.AnimsCount; for (int i = 0; i < omf_2.Anims.Count; i++) { AnimVector anim = omf_2.Anims[i]; for (int ii = 0; ii < list.Count; ii++) { if (anim.MotionName == list[ii]) { omf_1.AddAnim(anim); AnimationParams anim_param = omf_2.AnimsParams[i]; anim_param.MotionID = new_count; if ((omf_1.bone_cont.OGF_V != omf_2.bone_cont.OGF_V) && omf_1.bone_cont.OGF_V == 3) { anim_param.MarksCount = 0; anim_param.m_marks = null; } omf_1.AddAnimParams(anim_param); new_count++; } } } omf_1.RecalcAnimNum(); omf_1.RecalcAllAnimIndex(); }
public void CopyAnims(AnimationsContainer omf_1, AnimationsContainer omf_2) { //bool omf_1.bone_cont.OGF_V != omf_2.bone_cont.OGF_V omf_1.RecalcAnimNum(); foreach (AnimVector anim in omf_2.Anims) { omf_1.AddAnim(anim); } short b = (short)omf_1.AnimsCount; foreach (AnimationParams anim_param in omf_2.AnimsParams) { anim_param.MotionID = b; if ((omf_1.bone_cont.OGF_V != omf_2.bone_cont.OGF_V) && omf_1.bone_cont.OGF_V == 3) { anim_param.MarksCount = 0; anim_param.m_marks = null; } omf_1.AddAnimParams(anim_param); b++; } omf_1.RecalcAnimNum(); omf_1.RecalcAllAnimIndex(); }
private void deleteToolStripMenuItem_Click(object sender, EventArgs e) { if (current_index == -1) { return; } Main_OMF.Anims.RemoveAt(current_index); Main_OMF.AnimsParams.RemoveAt(current_index); Main_OMF.RecalcAllAnimIndex(); Main_OMF.RecalcAnimNum(); UpdateList(); if (current_index != 0) { listBox1.SelectedIndex = current_index - 1; } else { listBox1.SelectedIndex = 0; } current_index = -1; }