FloatCurve() 공개 정적인 메소드

public static FloatCurve ( string inPath, Type inType, string inPropertyName ) : EditorCurveBinding
inPath string
inType System.Type
inPropertyName string
리턴 EditorCurveBinding
예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #4
0
 public static AnimationCurve GetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName)
 {
     return(GetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName)));
 }
예제 #5
0
 public static void SetEditorCurve(AnimationClip clip, string relativePath, Type type, string propertyName, AnimationCurve curve)
 {
     SetEditorCurve(clip, EditorCurveBinding.FloatCurve(relativePath, type, propertyName), curve);
 }
예제 #6
0
 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));
 }
예제 #7
0
        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);
        }