static bool IsBoneVisibleInFilter(SkeletonBoneNode bone, bool onlySHowUsedBones, string filterText, bool checkChildren)
            {
                var contains = bone.BoneName.IndexOf(filterText, StringComparison.OrdinalIgnoreCase) != -1;

                if (onlySHowUsedBones)
                {
                    if (contains && bone.IsUsedByCurrentModel)
                    {
                        return(contains);
                    }
                }
                else
                {
                    if (contains)
                    {
                        return(contains);
                    }
                }
                if (checkChildren)
                {
                    foreach (var child in bone.Children)
                    {
                        var res = IsBoneVisibleInFilter(child, onlySHowUsedBones, filterText, checkChildren);
                        if (res == true)
                        {
                            return(true);
                        }
                    }
                }

                return(false);
            }
 static void RecusrivlyBuildMappingList(SkeletonBoneNode bone, List <int> output)
 {
     if (bone.IsChecked)
     {
         output.Add(bone.BoneIndex);
     }
     foreach (var child in bone.Children)
     {
         RecusrivlyBuildMappingList(child, output);
     }
 }
        SkeletonBoneNode CreateNode(int boneId, int parentBoneId, string boneName, List <byte> usedBonesList)
        {
            SkeletonBoneNode item = new SkeletonBoneNode
            {
                BoneIndex            = boneId,
                BoneName             = boneName,
                ParentBoneIndex      = parentBoneId,
                IsUsedByCurrentModel = usedBonesList.IndexOf((byte)boneId) != -1
            };

            return(item);
        }