public static void ConvertToClipMode(this AnimationTrack track)
 {
     if (track.CanConvertToClipMode())
     {
         TimelineUndo.PushUndo(track, "Convert To Clip");
         if (!track.animClip.get_empty())
         {
             TimelineUndo.PushUndo(track.animClip, "Convert To Clip");
             float num = AnimationClipCurveCache.Instance.GetCurveInfo(track.animClip).keyTimes.FirstOrDefault <float>();
             track.animClip.ShiftBySeconds(-num);
             TimelineClip timelineClip = track.CreateClipFromAsset(track.animClip);
             TimelineCreateUtilities.SaveAssetIntoObject(timelineClip.asset, track);
             timelineClip.start = (double)num;
             timelineClip.preExtrapolationMode  = track.openClipPreExtrapolation;
             timelineClip.postExtrapolationMode = track.openClipPostExtrapolation;
             timelineClip.recordable            = true;
             if (Math.Abs(timelineClip.duration) < 1.4012984643248171E-45)
             {
                 timelineClip.duration = 1.0;
             }
             AnimationPlayableAsset animationPlayableAsset = timelineClip.asset as AnimationPlayableAsset;
             if (animationPlayableAsset)
             {
                 animationPlayableAsset.position = track.openClipOffsetPosition;
                 animationPlayableAsset.rotation = track.openClipOffsetRotation;
                 track.openClipOffsetPosition    = Vector3.get_zero();
                 track.openClipOffsetRotation    = Quaternion.get_identity();
             }
             track.CalculateExtrapolationTimes();
         }
         track.animClip = null;
         EditorUtility.SetDirty(track);
     }
 }