Beispiel #1
0
 private void PopulateList(MorphKind kind)
 {
     _pmx = GetCurrentScene();
     morphList.Items.Clear();
     for (int i = 0; i < _pmx.Morph.Count; ++i)
     {
         IPXMorph morph = _pmx.Morph[i];
         if (MorphIsOfKind(morph, kind))
         {
             ListViewItem item = new ListViewItem(new string[] { morph.Name, morph.NameE });
             item.Tag = i;
             morphList.Items.Add(item);
         }
     }
 }
Beispiel #2
0
        private bool MorphIsOfKind(IPXMorph morph, MorphKind kind)
        {
            switch (kind)
            {
            case MorphKind.Vertex:
                return(morph.Kind == PEPlugin.Pmx.MorphKind.Vertex);

            case MorphKind.UV:
                return(morph.Kind == PEPlugin.Pmx.MorphKind.UV || morph.Kind == PEPlugin.Pmx.MorphKind.UVA1 || morph.Kind == PEPlugin.Pmx.MorphKind.UVA2 || morph.Kind == PEPlugin.Pmx.MorphKind.UVA3 || morph.Kind == PEPlugin.Pmx.MorphKind.UVA4);

            case MorphKind.BoneRotation:
            case MorphKind.BoneTranslation:
                return(morph.Kind == PEPlugin.Pmx.MorphKind.Bone);

            default:
                return(false);
            }
        }