summaryrefslogtreecommitdiff
path: root/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-10-13 10:33:05 +0800
committerchai <chaifix@163.com>2020-10-13 10:33:05 +0800
commitfc6de82e75310b4c007d80753a5f58e6692f4855 (patch)
treee6d8d9226595a6727d43f18a218f53533101a4e0 /Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs
parent8cd16fb71177bb61a9475284d944bc6aba30740e (diff)
+misc
Diffstat (limited to 'Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs')
-rw-r--r--Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs210
1 files changed, 105 insertions, 105 deletions
diff --git a/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs b/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs
index 0b44b879..d3238362 100644
--- a/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs
+++ b/Assets/ThirdParty/UMotion/UMotionEditor/Scripts/Editor/AnimationCurveUtilityRecent.cs
@@ -1,105 +1,105 @@
-using UnityEngine;
-using UnityEditor;
-using System.Collections;
-using System.Reflection;
-
-namespace UMotionEditor
-{
- public static class AnimationCurveUtilityRecent
- {
- //********************************************************************************
- // Public Properties
- //********************************************************************************
-
- public static bool WeightedTangentsImplemented
- {
- get
- {
- #if UNITY_2018_1_OR_NEWER
- return true;
- #else
- return false;
- #endif
- }
- }
-
- //********************************************************************************
- // Private Properties
- //********************************************************************************
-
- //----------------------
- // Inspector
- //----------------------
-
- //----------------------
- // Internal
- //----------------------
-
- //********************************************************************************
- // Public Methods
- //********************************************************************************
-
- public static void SetKeyWeightedMode(ref Keyframe key, int weightedMode)
- {
- #if UNITY_2018_1_OR_NEWER
- key.weightedMode = (WeightedMode)weightedMode;
- #endif
- }
-
- public static int GetKeyWeightedMode(Keyframe key)
- {
- #if UNITY_2018_1_OR_NEWER
- return (int)key.weightedMode;
- #else
- return 0;
- #endif
- }
-
- public static void SetKeyLeftWeight(ref Keyframe key, float weight)
- {
- #if UNITY_2018_1_OR_NEWER
- key.inWeight = weight;
- #endif
- }
-
- public static float GetKeyLeftWeight(Keyframe key)
- {
- #if UNITY_2018_1_OR_NEWER
- return key.inWeight;
- #else
- return 1f / 3f;
- #endif
- }
-
- public static void SetKeyRightWeight(ref Keyframe key, float weight)
- {
- #if UNITY_2018_1_OR_NEWER
- key.outWeight = weight;
- #endif
- }
-
- public static float GetKeyRightWeight(Keyframe key)
- {
- #if UNITY_2018_1_OR_NEWER
- return key.outWeight;
- #else
- return 1f / 3f;
- #endif
- }
-
- public static void InitializeKeyframe(int frame, float value, float inTangent, float outTangent, int weightedMode, float leftWeight, float rightWeight, out Keyframe key)
- {
- key = new Keyframe(frame, value, inTangent, outTangent);
-
- #if UNITY_2018_1_OR_NEWER
- key.weightedMode = (WeightedMode)weightedMode;
- key.inWeight = leftWeight;
- key.outWeight = rightWeight;
- #endif
- }
-
- //********************************************************************************
- // Private Methods
- //********************************************************************************
- }
-}
+using UnityEngine;
+using UnityEditor;
+using System.Collections;
+using System.Reflection;
+
+namespace UMotionEditor
+{
+ public static class AnimationCurveUtilityRecent
+ {
+ //********************************************************************************
+ // Public Properties
+ //********************************************************************************
+
+ public static bool WeightedTangentsImplemented
+ {
+ get
+ {
+ #if UNITY_2018_1_OR_NEWER
+ return true;
+ #else
+ return false;
+ #endif
+ }
+ }
+
+ //********************************************************************************
+ // Private Properties
+ //********************************************************************************
+
+ //----------------------
+ // Inspector
+ //----------------------
+
+ //----------------------
+ // Internal
+ //----------------------
+
+ //********************************************************************************
+ // Public Methods
+ //********************************************************************************
+
+ public static void SetKeyWeightedMode(ref Keyframe key, int weightedMode)
+ {
+ #if UNITY_2018_1_OR_NEWER
+ key.weightedMode = (WeightedMode)weightedMode;
+ #endif
+ }
+
+ public static int GetKeyWeightedMode(Keyframe key)
+ {
+ #if UNITY_2018_1_OR_NEWER
+ return (int)key.weightedMode;
+ #else
+ return 0;
+ #endif
+ }
+
+ public static void SetKeyLeftWeight(ref Keyframe key, float weight)
+ {
+ #if UNITY_2018_1_OR_NEWER
+ key.inWeight = weight;
+ #endif
+ }
+
+ public static float GetKeyLeftWeight(Keyframe key)
+ {
+ #if UNITY_2018_1_OR_NEWER
+ return key.inWeight;
+ #else
+ return 1f / 3f;
+ #endif
+ }
+
+ public static void SetKeyRightWeight(ref Keyframe key, float weight)
+ {
+ #if UNITY_2018_1_OR_NEWER
+ key.outWeight = weight;
+ #endif
+ }
+
+ public static float GetKeyRightWeight(Keyframe key)
+ {
+ #if UNITY_2018_1_OR_NEWER
+ return key.outWeight;
+ #else
+ return 1f / 3f;
+ #endif
+ }
+
+ public static void InitializeKeyframe(int frame, float value, float inTangent, float outTangent, int weightedMode, float leftWeight, float rightWeight, out Keyframe key)
+ {
+ key = new Keyframe(frame, value, inTangent, outTangent);
+
+ #if UNITY_2018_1_OR_NEWER
+ key.weightedMode = (WeightedMode)weightedMode;
+ key.inWeight = leftWeight;
+ key.outWeight = rightWeight;
+ #endif
+ }
+
+ //********************************************************************************
+ // Private Methods
+ //********************************************************************************
+ }
+}