private void AddSelectedSkeletonBones(ListBox listBoxFrom, ListBox listBoxTo, Mhx2Model mhx2From, Mhx2Model mhx2To) { foreach (int index in listBoxFrom.SelectedIndices) { mhx2To.AddSkeletonBone(mhx2From.GetSkeletonBone(index)); } listBoxTo.ClearSelected(); listBoxTo.Items.Clear(); listBoxTo.Items.AddRange(mhx2To.GetSkeletonBoneNames()); }
private void DeleteSelectedSkeletonBones(ListBox listBox, Mhx2Model mhx2) { for (int i = listBox.SelectedIndices.Count - 1; i >= 0; --i) { mhx2.DeleteSkeletonBone(listBox.SelectedIndices[i]); } listBox.ClearSelected(); listBox.Items.Clear(); listBox.Items.AddRange(mhx2.GetSkeletonBoneNames()); }
private void SetMhx2Right(Mhx2Model mhx2) { mhx2Right = mhx2; listBoxSkeletonRight.ClearSelected(); listBoxMaterialsRight.ClearSelected(); listBoxGeometriesRight.ClearSelected(); listBoxSkeletonRight.Items.Clear(); listBoxMaterialsRight.Items.Clear(); listBoxGeometriesRight.Items.Clear(); listBoxSkeletonRight.Items.AddRange(mhx2.GetSkeletonBoneNames()); listBoxMaterialsRight.Items.AddRange(mhx2.GetMaterialNames()); listBoxGeometriesRight.Items.AddRange(mhx2.GetGeometryNames()); ResetRight(); }