public void KeyFrameGen(int framesToGenerate, bool allowDuplicates, bool generateOrigin)
        {
            // If not in a brres, return
            if (_parent == null)
            {
                return; // Checks if in brres folder
            }
            if (_parent._parent == null)
            {
                return; // Checks if in brres
            }
            //Console.WriteLine("Parent is: " + _parent._parent);
            // Ensure models exist in a modeldata
            BRRESNode temp = (BRRESNode)_parent._parent;

            if (temp.GetFolder <MDL0Node>() == null)
            {
                //Console.WriteLine("  No MDL0 folder found");
                return;
            }
            // For every model in the model folder
            int j = 0;

            //Console.WriteLine(temp.GetFolder<MDL0Node>());
            foreach (MDL0Node m in temp.GetFolder <MDL0Node>().Children)
            {
                //Console.WriteLine("  " + m);
                // For every bone in a model
                MDL0BoneNode b = m.FindBoneByIndex(0);
                j = 0;
                while (b != null)
                {
                    ++j;
                    bool alreadyAdded = false;
                    if (b != null)
                    {
                        //Console.WriteLine("    Bone: " + b);
                        if (!allowDuplicates)
                        {
                            // Check if there's already an ID for such a bone
                            foreach (CHR0EntryNode ch in Children)
                            {
                                if (ch.ToString() == b.ToString() && alreadyAdded == false)
                                {
                                    alreadyAdded = true;
                                    //Console.WriteLine("      " + b + " has already been added to animation");
                                }
                            }
                        }
                        // If the bone has not been added or duplicates are allowed
                        if (!alreadyAdded)
                        {
                            //Console.WriteLine("      Adding keyframes for " + b);
                            CreateEntryFromBone(b, framesToGenerate, generateOrigin);
                        }
                    }
                    b = m.FindBoneByIndex(j);
                }
            }
        }
        public void KeyFrameGenFromBone(int framesToGenerate, bool allowOverwrite, bool generateOrigin)
        {
            // If not in a brres, return
            if (_parent == null)
            {
                return; // Checks if in chr0
            }
            if (_parent._parent == null)
            {
                return; // Checks if in brres folder
            }
            if (_parent._parent._parent == null)
            {
                return; // Checks if in brres
            }
            //Console.WriteLine("Parent is: " + _parent._parent._parent);
            // Ensure models exist in a modeldata
            BRRESNode temp = (BRRESNode)_parent._parent._parent;

            if (temp.GetFolder <MDL0Node>() == null)
            {
                //Console.WriteLine("  No MDL0 folder found");
                return;
            }
            // For every model in the model folder
            int j = 0;

            //Console.WriteLine(temp.GetFolder<MDL0Node>());
            foreach (MDL0Node m in temp.GetFolder <MDL0Node>().Children)
            {
                //Console.WriteLine("  " + m);
                // For every bone in a model
                MDL0BoneNode b = m.FindBone(Name);
                if (b == null)
                {
                    //Console.WriteLine("Could not find bone " + Name + " in model " + m);
                }
                else
                {
                    //Console.WriteLine("Found bone " + b + " in model " + m);
                    for (int i = 0; i < framesToGenerate; ++i)
                    {
                        generateKeyframeFromBone(b, i, allowOverwrite, generateOrigin);
                    }
                    return;
                }
            }
        }