static private ConvertRotationPropertiesToInterpolationType ( |
||
selection | ||
newInterpolationMode | Mode | |
리턴 | UnityEditor.EditorCurveBinding[] |
internal static EditorCurveBinding[] ConvertRotationPropertiesToInterpolationType(EditorCurveBinding[] selection, Mode newInterpolationMode)
{
if ((selection.Length == 4) && (GetModeFromCurveData(selection[0]) == Mode.RawQuaternions))
{
EditorCurveBinding[] bindingArray = new EditorCurveBinding[] { selection[0], selection[1], selection[2] };
string prefixForInterpolation = GetPrefixForInterpolation(newInterpolationMode);
bindingArray[0].propertyName = prefixForInterpolation + ".x";
bindingArray[1].propertyName = prefixForInterpolation + ".y";
bindingArray[2].propertyName = prefixForInterpolation + ".z";
return bindingArray;
}
return selection;
}
internal static EditorCurveBinding[] ConvertRotationPropertiesToDefaultInterpolation(AnimationClip clip, EditorCurveBinding[] selection) { RotationCurveInterpolation.Mode newInterpolationMode = !clip.legacy ? RotationCurveInterpolation.Mode.RawEuler : RotationCurveInterpolation.Mode.Baked; return(RotationCurveInterpolation.ConvertRotationPropertiesToInterpolationType(selection, newInterpolationMode)); }