UpdateTangentsFromMode() public static method

public static UpdateTangentsFromMode ( AnimationCurve curve, AnimationClip clip, EditorCurveBinding curveBinding ) : void
curve UnityEngine.AnimationCurve
clip UnityEngine.AnimationClip
curveBinding EditorCurveBinding
return void
 public static void UpdateTangentsFromMode(AnimationCurve curve, AnimationClip clip, EditorCurveBinding curveBinding)
 {
     if (RotationCurveInterpolation.GetModeFromCurveData(curveBinding) == RotationCurveInterpolation.Mode.NonBaked)
     {
         QuaternionCurveTangentCalculation calculation = new QuaternionCurveTangentCalculation();
         int curveIndexFromName = RotationCurveInterpolation.GetCurveIndexFromName(curveBinding.propertyName);
         for (int i = 0; i < 3; i++)
         {
             if (i == curveIndexFromName)
             {
                 calculation.SetCurve(i, curve);
             }
             else
             {
                 EditorCurveBinding binding = curveBinding;
                 binding.propertyName = "localEulerAngles." + RotationCurveInterpolation.kPostFix[i];
                 AnimationCurve editorCurve = AnimationUtility.GetEditorCurve(clip, binding);
                 if (editorCurve == null)
                 {
                     return;
                 }
                 calculation.SetCurve(i, editorCurve);
             }
         }
         calculation.UpdateTangentsFromMode(curveIndexFromName);
     }
     else
     {
         CurveUtility.UpdateTangentsFromMode(curve);
     }
 }