public static void SetKeyBroken(MovieCurve curve, int index, bool broken)
 {
     if (curve == null)
     {
         throw new ArgumentNullException("curve");
     }
     if (index < 0 || index >= curve.curve.length)
     {
         throw new ArgumentException("Index out of bounds.");
     }
     TangentUtility.SetKeyBroken(ref curve, index, broken);
     // curve.curve.MoveKey(index, key);
     TangentUtility.UpdateTangentsFromModeSurrounding(curve, index);
 }
 public static void SetKeyRightTangentMode(MovieCurve curve, int index, TangentUtility.TangentMode tangentMode)
 {
     if (curve == null)
     {
         throw new ArgumentNullException("curve");
     }
     if (index < 0 || index >= curve.curve.length)
     {
         throw new ArgumentException("Index out of bounds.");
     }
     if (tangentMode != TangentUtility.TangentMode.Free)
     {
         TangentUtility.SetKeyBroken(curve, index, true);
     }
     TangentUtility.SetKeyRightTangentMode(ref curve, index, tangentMode);
     // curve.MoveKey(index, key);
     TangentUtility.UpdateTangentsFromModeSurrounding(curve, index);
 }