public List <string> GetKeyNames(params GetKeyIgnoring[] opt) { var names = new List <string>(); IEnumerable <IGrouping <string, VmdMotionFrameData> > motions = MotionFrames.GroupBy(f => f.Name.Trim('\0'));; IEnumerable <IGrouping <string, VmdMorphFrameData> > morphs = MorphFrames.GroupBy(f => f.Name.Trim('\0')); if (opt.Contains(GetKeyIgnoring.ZeroValue)) { motions = motions.Where(g => g.Where(f => (f.Pos != Vector3.Zero) || (f.Rot != Quaternion.Identity)).Count() != 0); morphs = morphs.Where(g => g.Where(f => f.Weigth != 0).Count() != 0); } if (opt.Contains(GetKeyIgnoring.FirstFrame)) { //フレームタイムが0でないvmdを持つグループのみを抽出 motions = motions.Where(g => g.Where(f => f.FrameTime != 0).Count() != 0); morphs = morphs.Where(g => g.Where(f => f.FrameTime != 0).Count() != 0); } if (!opt.Contains(GetKeyIgnoring.Motion)) { names.AddRange(motions.Select(g => g.Key)); names.Sort(new Utilities.BoneNameComparer()); } if (!opt.Contains(GetKeyIgnoring.Morph)) { names.AddRange(morphs.Select(g => g.Key)); } return(names); }