diff --git a/Framework/Editor/V0/AacFlAnimations.cs b/Framework/Editor/V0/AacFlAnimations.cs index b4c2627..d6113e2 100644 --- a/Framework/Editor/V0/AacFlAnimations.cs +++ b/Framework/Editor/V0/AacFlAnimations.cs @@ -290,6 +290,14 @@ namespace AnimatorAsCode.V0 AnimationUtility.SetEditorCurve(_clip, binding, new AnimationCurve(mutatedKeyframes.ToArray())); } } + + public void WithAnimationCurve(AnimationCurve animationCurve) + { + foreach (var binding in _bindings) + { + AnimationUtility.SetEditorCurve(_clip, binding, animationCurve); + } + } } public class AacFlSettingCurveColor diff --git a/README.md b/README.md index 33944ee..7dca04a 100644 --- a/README.md +++ b/README.md @@ -747,6 +747,7 @@ foreach (var cancelWhenNotAllowed in new[] {auto, reverse, manual, custom, done} - `void WithSecondsUnit(Action action)` /// Start defining the keyframes with a lambda expression, expressing the unit to be in seconds. - `void WithFrameCountUnit(Action action)` /// Start defining the keyframes with a lambda expression, expressing the unit in frames. - `void WithUnit(AacFlUnit unit, Action action)` /// Start defining the keyframes with a lambda expression, expressing the unit. +- `void WithAnimationCurve(AnimationCurve animationCurve)` /// Define the curve using a traditional AnimationCurve. # Curve of type Color (AacFlSettingCurveColor)