public void Update(AnimationClip clip)
        {
            List <EditorCurveBinding> postfilter = new List <EditorCurveBinding>();
            var clipBindings = AnimationUtility.GetCurveBindings(clip);

            for (int i = 0; i < clipBindings.Length; i++)
            {
                var bind = clipBindings[i];
                if (!bind.propertyName.Contains("LocalRotation.w"))
                {
                    postfilter.Add(RotationCurveInterpolation.RemapAnimationBindingForRotationCurves(bind, clip));
                }
            }
            bindings = postfilter.ToArray();

            curves = new AnimationCurve[bindings.Length];
            for (int i = 0; i < bindings.Length; i++)
            {
                curves[i] = AnimationUtility.GetEditorCurve(clip, bindings[i]);
            }

            objectBindings = AnimationUtility.GetObjectReferenceCurveBindings(clip);
            objectCurves   = new List <ObjectReferenceKeyframe[]>(objectBindings.Length);
            for (int i = 0; i < objectBindings.Length; i++)
            {
                objectCurves.Add(AnimationUtility.GetObjectReferenceCurve(clip, objectBindings[i]));
            }

            snapshotBindings = AnimationMode.GetCurveBindings(clip);

            m_CurveDirty = false;
            m_KeysDirty  = true;

            version = version + 1;
        }
        public EditorCurveBinding[] GetCurveBindings(AnimationClip clip)
        {
            if (clip == null)
            {
                return(kEmptyArray);
            }

            EditorCurveBinding[] result;
            if (!m_ClipCache.TryGetValue(clip, out result))
            {
                result = AnimationMode.GetCurveBindings(clip);
                UpdateTransformBindings(result);
                m_ClipCache[clip] = result;
            }

            return(result);
        }