public static void preAnimator(Animator animator)
    {
        GameObject curObj = animator.gameObject;

        FB.PosePlus.AniPlayer player = curObj.GetComponent <FB.PosePlus.AniPlayer>();
        if (player == null)
        {
            player = curObj.AddComponent <FB.PosePlus.AniPlayer>();
        }
        player.InitBone();

        if (animator.runtimeAnimatorController != null)
        {
            List <AnimationClip> clips = new List <AnimationClip>();
#if UNITY4
            Animator_Inspector.FindAllAniInControl(animator.runtimeAnimatorController as UnityEditorInternal.AnimatorController, clips);
#else
            Animator_Inspector.FindAllAniInControl(animator.runtimeAnimatorController as UnityEditor.Animations.AnimatorController, clips);
#endif
            foreach (var c in clips)
            {
                Animator_Inspector.CloneAni(c, c.frameRate, animator);
            }
        }
    }
    public static void preAnimation(Animation animation)
    {
        GameObject curObj = animation.gameObject;

        FB.PosePlus.AniPlayer player = curObj.GetComponent <FB.PosePlus.AniPlayer>();
        if (player == null)
        {
            player = curObj.AddComponent <FB.PosePlus.AniPlayer>();
        }
        player.InitBone();

        List <AnimationClip> clips = new List <AnimationClip>();

        foreach (AnimationState state in animation)
        {
            clips.Add(state.clip);
        }
        foreach (var c in clips)
        {
            AddClip(c, c.frameRate, animation);
        }
    }