Ejemplo n.º 1
0
        public void populateBoneChunk(string modelName)
        {
            var file = File.ReadAllLines(@"rootFiles\BONE_Root").Select(s => s.Split(',')).ToArray();

            for (int i = 0; i < file.Length; i++)
            {
                if ((file[i][0].ToLowerInvariant()).StartsWith(modelName) && (file[i][0].ToLowerInvariant()).EndsWith(".bone"))
                {
                    string name = (file[i][0].ToLowerInvariant());
                    name = name.Replace("-", "");
                    name = Regex.Replace(name, @"[\d-]", string.Empty);
                    name = name.Replace("_.", ".");
                    name = name.Replace(".bone", "");
                    if (name == modelName)
                    {
                        BoneChunk.Add(new BoneChunk()
                        {
                            fileName = file[i][0],
                            rootId   = file[i][1],
                        });
                    }
                }
                else if (((file[i][0].ToLowerInvariant()).StartsWith(modelName) && (file[i][0].ToLowerInvariant()).EndsWith(".bone")) == false)
                {
                    continue;
                }
            }
        }
Ejemplo n.º 2
0
        public WodMd20ToMd21(string modelName, string path)
        {
            AnimChunk.Clear();
            BoneChunk.Clear();
            SkinChunk.Clear();
            PhysChunk.Clear();
            //Lecture des fichiers root du multitool pour peupler les listes.
            populateAnimChunk(modelName);
            populateBoneChunk(modelName);
            populateSkinChunk(modelName);
            populatePhysChunk(modelName);

            writeData(modelName, path);
        }