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>2007-12-19 13:52:26 +0300
committerJoshua Leung <aligorith@gmail.com>2007-12-19 13:52:26 +0300
commitda22572e4cf76b87951aa5edaaf87d99c315ef98 (patch)
tree44cffb70fbd482a8b7b5ff20db1806a98ff86953 /source/blender/src
parentbbc7894dd84b71e4f7aabd337231b164765e8f9c (diff)
== Action Editor - Long Keyframes ==
Now Long-Keyframes in the Action Editor (yellow/pink strips between keyframes) take into account whether the keyframe handles which help control the interpolation between the two keyframes stay at the same value as the keyframes do. This way, long keyframes are not drawn when the keys have the same value, but there's still movement between them.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawaction.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index 3cfe3731367..6cda5e69ea7 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -1045,11 +1045,14 @@ static void add_bezt_to_keyblockslist(ListBase *blocks, IpoCurve *icu, int index
}
}
- /* check if block needed - same value? */
- if ((!prev) || (!beztn))
- return;
- if (beztn->vec[1][1] != prev->vec[1][1])
- return;
+ /* check if block needed - same value(s)?
+ * -> firstly, handles must have same central value as each other
+ * -> secondly, handles which control that section of the curve must be constant
+ */
+ if ((!prev) || (!beztn)) return;
+ if (IS_EQ(beztn->vec[1][1], prev->vec[1][1])==0) return;
+ if (IS_EQ(beztn->vec[1][1], beztn->vec[0][1])==0) return;
+ if (IS_EQ(prev->vec[1][1], prev->vec[2][1])==0) return;
/* try to find a keyblock that starts on the previous beztriple */
for (ab= blocks->first; ab; ab= ab->next) {