示例#1
0
 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());
 }
示例#2
0
 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());
 }
示例#3
0
 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());
 }
示例#4
0
 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());
 }
示例#5
0
        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();
        }