Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2014-04-27 17:42:51 +0400
committerJoshua Leung <aligorith@gmail.com>2014-04-28 18:23:53 +0400
commit6feec25bddfb96f979c89611840f1f558b7cd92c (patch)
treea7183cc78aa05a0b2d820dd6193d55cb9cf9742c /source/blender/blenkernel/intern/fcurve.c
parenta3a3141f53e5341cc4c669297ed1d894ad1d89e1 (diff)
"Auto" option for Keyframe.easing
This option (alongside the Ease In/Out/InOut options already available) aims to make it easier to get an initial curve that looks closer to the one you were expecting, by automatically picking whether Ease In or Ease Out should be used based on the type of interpolation being used for the curve segment in question. Notes: * The types chosen may need some adjustments (e.g. using ease in-out instead of just ease in) * This does break compatability with files saved in previous dev builds, but only if you were using Bounce/Elastic/Back with "Ease In"
Diffstat (limited to 'source/blender/blenkernel/intern/fcurve.c')
-rw-r--r--source/blender/blenkernel/intern/fcurve.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c
index d4fa9de1043..281b4f589e1 100644
--- a/source/blender/blenkernel/intern/fcurve.c
+++ b/source/blender/blenkernel/intern/fcurve.c
@@ -2139,6 +2139,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_back_ease_in_out(time, begin, change, duration, prevbezt->back);
break;
+
+ default: /* default/auto: same as ease out */
+ cvalue = BLI_easing_back_ease_out(time, begin, change, duration, prevbezt->back);
+ break;
}
break;
@@ -2153,6 +2157,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_bounce_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease out */
+ cvalue = BLI_easing_bounce_ease_out(time, begin, change, duration);
+ break;
}
break;
@@ -2167,6 +2175,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_circ_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_circ_ease_in(time, begin, change, duration);
+ break;
}
break;
@@ -2181,6 +2193,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_cubic_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_cubic_ease_in(time, begin, change, duration);
+ break;
}
break;
@@ -2195,6 +2211,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_elastic_ease_in_out(time, begin, change, duration, amplitude, period);
break;
+
+ default: /* default/auto: same as ease out */
+ cvalue = BLI_easing_elastic_ease_out(time, begin, change, duration, amplitude, period);
+ break;
}
break;
@@ -2209,6 +2229,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_expo_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_expo_ease_in(time, begin, change, duration);
+ break;
}
break;
@@ -2223,6 +2247,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_quad_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_quad_ease_in(time, begin, change, duration);
+ break;
}
break;
@@ -2237,6 +2265,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_quart_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_quart_ease_in(time, begin, change, duration);
+ break;
}
break;
@@ -2251,6 +2283,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_quint_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_quint_ease_in(time, begin, change, duration);
+ break;
}
break;
@@ -2265,6 +2301,10 @@ static float fcurve_eval_keyframes(FCurve *fcu, BezTriple *bezts, float evaltime
case BEZT_IPO_EASE_IN_OUT:
cvalue = BLI_easing_sine_ease_in_out(time, begin, change, duration);
break;
+
+ default: /* default/auto: same as ease in */
+ cvalue = BLI_easing_sine_ease_in(time, begin, change, duration);
+ break;
}
break;