/// <summary> /// モーフライブラリを読み込みます。 /// </summary> /// <param name="source_path">フォルダ名</param> public void Load(string source_path) { foreach (string group_path in Directory.GetDirectories(source_path)) { //Debug.WriteLine("group_path: " + group_path); string group_name = Path.GetFileName(group_path); Debug.WriteLine("group_name: " + group_name); NodesRange nodes_range = NodesRange.Load(Path.Combine(group_path, @"NodesRange.xml")); MorphGroup group = new MorphGroup(group_name, nodes_range); groups.Add(group); foreach (string tmo_file in Directory.GetFiles(Path.Combine(source_path, group_path), @"*.tmo")) { //Debug.WriteLine("tmo_file: " + tmo_file); string morph_name = Path.GetFileNameWithoutExtension(tmo_file); Debug.WriteLine("morph_name: " + morph_name); TMOFile tmo = new TMOFile(); tmo.Load(tmo_file); tmo.LoadTransformationMatrixFromFrame(0); Morph morph = new Morph(morph_name, tmo); group.Items.Add(morph); } } }
/// <summary> /// モーフライブラリを読み込みます。 /// </summary> /// <param name="source_path">フォルダ名</param> public void Load(string source_path) { foreach (string group_path in Directory.GetDirectories(source_path)) { //Debug.WriteLine("group_path: " + group_path); string group_name = Path.GetFileName(group_path); Debug.WriteLine("group_name: " + group_name); NodesRange nodes_range = NodesRange.Load(Path.Combine(group_path, @"NodesRange.xml")); MorphGroup group = new MorphGroup(group_name, nodes_range); groups.Add(group); foreach (string tmo_file in Directory.GetFiles(Path.Combine(source_path, group_path), @"*.tmo")) { //Debug.WriteLine("tmo_file: " + tmo_file); string morph_name = Path.GetFileNameWithoutExtension(tmo_file); Debug.WriteLine("morph_name: " + morph_name); TMOFile tmo = new TMOFile(); tmo.Load(tmo_file); tmo.LoadTransformationMatrixFromFrame(0); Morph morph = new Morph(morph_name, tmo); group.Items.Add(morph); } } }