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-03-21 17:50:24 +0400
committerJoshua Leung <aligorith@gmail.com>2014-03-21 18:00:27 +0400
commitdaccaa713b6e66af4b958fa373b31d557a4caa33 (patch)
tree9e257e0b6d9e641ab3c9843304c9644ff9ca76ab /source/blender/makesrna/intern/rna_curve.c
parent6e99fb04b6cccef4d5685184dfd0d1406fc6e624 (diff)
Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types which are useful for motion-graphics work. These define a number of "easing equations" (basically, equations which define some preset ways that one keyframe transitions to another) which reduce the amount of manual work (inserting and tweaking keyframes) to achieve certain common effects. For example, snappy movements, and fake-physics such as bouncing/springing effects. The additional interpolation types introduced in this commit can be found in many packages and toolkits (notably Qt and all modern web browsers). For more info and a few live demos, see [1] and [2]. Credits: * Dan Eicher (dna) - Original patch * Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase * Joshua Leung (aligorith) - Code review and a few polishing tweaks Additional Resources: [1] http://easings.net [2] http://www.robertpenner.com/easing/
Diffstat (limited to 'source/blender/makesrna/intern/rna_curve.c')
-rw-r--r--source/blender/makesrna/intern/rna_curve.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 0c17b55d2c6..a4d099c69c7 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -34,6 +34,8 @@
#include "BLI_utildefines.h"
#include "BLI_math.h"
+#include "BLF_translation.h"
+
#include "BKE_font.h"
#include "RNA_access.h"
@@ -67,9 +69,29 @@ EnumPropertyItem keyframe_handle_type_items[] = {
};
EnumPropertyItem beztriple_interpolation_mode_items[] = {
+ /* interpolation */
+ {0, "", 0, N_("Interpolation"), "Standard transitions between keyframes"},
{BEZT_IPO_CONST, "CONSTANT", 0, "Constant", "No interpolation, value of A gets held until B is encountered"},
{BEZT_IPO_LIN, "LINEAR", 0, "Linear", "Straight-line interpolation between A and B (i.e. no ease in/out)"},
{BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", "Smooth interpolation between A and B, with some control over curve shape"},
+
+ /* easing */
+ {0, "", 0, N_("Easing (by strength)"), "Predefined inertial transitions, useful for motion graphics (from least to most ''dramatic'')"},
+ {BEZT_IPO_QUAD, "QUAD", 0, "Quadratic", "Quadratic easing (weakest)"},
+ {BEZT_IPO_CUBIC, "CUBIC", 0, "Cubic", "Cubic easing"},
+ {BEZT_IPO_QUART, "QUART", 0, "Quartic", "Quartic easing"},
+ {BEZT_IPO_QUINT, "QUINT", 0, "Quintic", "Quintic easing"},
+ {BEZT_IPO_EXPO, "EXPO", 0, "Exponential", "Exponential easing (strongest)"},
+
+ {0, "", 0, N_("Dynamic Effects"), "Simple physics-inspired easing effects"},
+ {BEZT_IPO_BACK, "BACK", 0, "Back", "Cubic easing with overshoot and settle"},
+ {BEZT_IPO_BOUNCE, "BOUNCE", 0, "Bounce", "Exponentially decaying parabolic bounce, like when objects collide"},
+ {BEZT_IPO_ELASTIC, "ELASTIC", 0, "Elastic", "Exponentially decaying sine wave, like an elastic band"},
+
+ {0, "", 0, N_("Other"), "Other easing equations"},
+ {BEZT_IPO_SINE, "SINE", 0, "Sinusoidal", "Sinusoidal easing"},
+ {BEZT_IPO_CIRC, "CIRC", 0, "Circular", "Circular easing"},
+
{0, NULL, 0, NULL, NULL}
};