public static FloatCurve ( string inPath, |
||
inPath | string | |
inType | ||
inPropertyName | string | |
Résultat |
private static EditorCurveBinding[] GenerateTransformCurveBindingArray(string path, string property, System.Type type, int count) { EditorCurveBinding[] bindingArray = new EditorCurveBinding[count]; for (int i = 0; i < count; i++) { bindingArray[i] = EditorCurveBinding.FloatCurve(path, type, property + kPostFix[i]); } return(bindingArray); }
private static EditorCurveBinding[] GenerateTransformCurveBindingArray(string path, string property, System.Type type, int count) { EditorCurveBinding[] editorCurveBindingArray = new EditorCurveBinding[count]; for (int index = 0; index < count; ++index) { editorCurveBindingArray[index] = EditorCurveBinding.FloatCurve(path, type, property + (object)RotationCurveInterpolation.kPostFix[index]); } return(editorCurveBindingArray); }
private static EditorCurveBinding[] GenerateTransformCurveBindingArray(string path, string property, Type type, int count) { EditorCurveBinding[] array = new EditorCurveBinding[count]; for (int i = 0; i < count; i++) { array[i] = EditorCurveBinding.FloatCurve(path, type, property + RotationCurveInterpolation.kPostFix[i]); } return(array); }
public static AnimationCurve GetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName) { return(GetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName))); }
public static void SetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName, AnimationCurve curve) { SetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), curve); }
public static bool GetFloatValue(GameObject root, string relativePath, Type type, string propertyName, out float data) { return(GetFloatValue(root, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), out data)); }
public static CurveRenderer GetCurveRenderer(AnimationClip clip, EditorCurveBinding curveBinding) { if (curveBinding.type == typeof(Transform) && curveBinding.propertyName.StartsWith("localEulerAngles.")) { int curveIndexFromName = RotationCurveInterpolation.GetCurveIndexFromName(curveBinding.propertyName); string key = CurveUtility.GetCurveGroupID(clip, curveBinding).ToString(); EulerCurveCombinedRenderer eulerCurveCombinedRenderer = (EulerCurveCombinedRenderer)CurveRendererCache.m_CombiRenderers[key]; if (eulerCurveCombinedRenderer == null) { eulerCurveCombinedRenderer = new EulerCurveCombinedRenderer(AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "m_LocalRotation.x")), AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "m_LocalRotation.y")), AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "m_LocalRotation.z")), AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "m_LocalRotation.w")), AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "localEulerAngles.x")), AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "localEulerAngles.y")), AnimationUtility.GetEditorCurve(clip, EditorCurveBinding.FloatCurve(curveBinding.path, typeof(Transform), "localEulerAngles.z"))); CurveRendererCache.m_CombiRenderers.Add(key, eulerCurveCombinedRenderer); } return(new EulerCurveRenderer(curveIndexFromName, eulerCurveCombinedRenderer)); } string key2 = CurveUtility.GetCurveID(clip, curveBinding).ToString(); NormalCurveRenderer normalCurveRenderer = (NormalCurveRenderer)CurveRendererCache.m_NormalRenderers[key2]; if (normalCurveRenderer == null) { normalCurveRenderer = new NormalCurveRenderer(AnimationUtility.GetEditorCurve(clip, curveBinding)); CurveRendererCache.m_NormalRenderers.Add(key2, normalCurveRenderer); } return(normalCurveRenderer); }