private void DeleteSelectedGeometries(ListBox listBox, Mhx2Model mhx2) { for (int i = listBox.SelectedIndices.Count - 1; i >= 0; --i) { mhx2.DeleteGeometry(listBox.SelectedIndices[i]); } listBox.ClearSelected(); listBox.Items.Clear(); listBox.Items.AddRange(mhx2.GetGeometryNames()); }
private void AddSelectedGeometries(ListBox listBoxFrom, ListBox listBoxTo, Mhx2Model mhx2From, Mhx2Model mhx2To) { foreach (int index in listBoxFrom.SelectedIndices) { mhx2To.AddGeometry(mhx2From.GetGeometry(index)); } listBoxTo.ClearSelected(); listBoxTo.Items.Clear(); listBoxTo.Items.AddRange(mhx2To.GetGeometryNames()); }
private void DeleteSelectedMaterials(ListBox listBox, Mhx2Model mhx2) { for (int i = listBox.SelectedIndices.Count - 1; i >= 0; --i) { mhx2.DeleteMaterial(listBox.SelectedIndices[i]); } listBox.ClearSelected(); listBox.Items.Clear(); listBox.Items.AddRange(mhx2.GetMaterialNames()); }
private void AddSelectedMaterials(ListBox listBoxFrom, ListBox listBoxTo, Mhx2Model mhx2From, Mhx2Model mhx2To) { foreach (int index in listBoxFrom.SelectedIndices) { mhx2To.AddMaterial(mhx2From.GetMaterial(index)); } listBoxTo.ClearSelected(); listBoxTo.Items.Clear(); listBoxTo.Items.AddRange(mhx2To.GetMaterialNames()); }
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(); }