public void AddEdgeFramesIfMissing(float animationLength) { var lastCurveType = x.length > 0 ? x.GetLastFrame().curveType : CurveTypeValues.SmoothLocal; dirty = x.AddEdgeFramesIfMissing(animationLength, lastCurveType); y.AddEdgeFramesIfMissing(animationLength, lastCurveType); z.AddEdgeFramesIfMissing(animationLength, lastCurveType); rotX.AddEdgeFramesIfMissing(animationLength, lastCurveType); rotY.AddEdgeFramesIfMissing(animationLength, lastCurveType); rotZ.AddEdgeFramesIfMissing(animationLength, lastCurveType); rotW.AddEdgeFramesIfMissing(animationLength, lastCurveType); if (dirty && lastCurveType == CurveTypeValues.CopyPrevious && x.length > 2 && x.keys[x.length - 2].curveType == CurveTypeValues.CopyPrevious) { DeleteFrame(x.keys[x.length - 2].time); } }