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>2011-08-04 18:13:05 +0400
committerJoshua Leung <aligorith@gmail.com>2011-08-04 18:13:05 +0400
commit900928f8bf47b8f1bbb1b2cd863d2d9649c940a0 (patch)
treee5d20746f2a35a5dca94dba00d1d0dc1ff83eeec /source/blender/blenkernel/intern/ipo.c
parent2ed11158db7cfc157c26475a2dcb5f513043cd72 (diff)
Bassam Feature Request: "Auto Clamped" handles can now be set per
handle/key This used to be a weird per-curve setting which would happen to get applied/work correctly if handles were set to "auto", and was a source of constant confusion for both old and new animators. The main effect of this handle-type/option was really to just ensure that auto-handles stayed horizontal, instead of tilting as the keys were moved. This commit simply changes this from a per-curve to per keyframe/handle setting.
Diffstat (limited to 'source/blender/blenkernel/intern/ipo.c')
-rw-r--r--source/blender/blenkernel/intern/ipo.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/ipo.c b/source/blender/blenkernel/intern/ipo.c
index 104ce2b3b32..d41a3a36b2d 100644
--- a/source/blender/blenkernel/intern/ipo.c
+++ b/source/blender/blenkernel/intern/ipo.c
@@ -1157,7 +1157,6 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
if (icu->flag & IPO_ACTIVE) fcu->flag |= FCURVE_ACTIVE;
if (icu->flag & IPO_MUTE) fcu->flag |= FCURVE_MUTED;
if (icu->flag & IPO_PROTECT) fcu->flag |= FCURVE_PROTECTED;
- if (icu->flag & IPO_AUTO_HORIZ) fcu->flag |= FCURVE_AUTO_HANDLES;
/* set extrapolation */
switch (icu->extrap) {
@@ -1242,6 +1241,12 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
/* 'hide' flag is now used for keytype - only 'keyframes' existed before */
dst->hide= BEZT_KEYTYPE_KEYFRAME;
+ /* auto-handles - per curve to per handle */
+ if (icu->flag & IPO_AUTO_HORIZ) {
+ if (dst->h1 == HD_AUTO) dst->h1 = HD_AUTO_ANIM;
+ if (dst->h2 == HD_AUTO) dst->h2 = HD_AUTO_ANIM;
+ }
+
/* correct values, by checking if the flag of interest is set */
if ( ((int)(dst->vec[1][1])) & (abp->bit) )
dst->vec[0][1]= dst->vec[1][1]= dst->vec[2][1] = 1.0f;
@@ -1292,6 +1297,12 @@ static void icu_to_fcurves (ID *id, ListBase *groups, ListBase *list, IpoCurve *
/* 'hide' flag is now used for keytype - only 'keyframes' existed before */
dst->hide= BEZT_KEYTYPE_KEYFRAME;
+
+ /* auto-handles - per curve to per handle */
+ if (icu->flag & IPO_AUTO_HORIZ) {
+ if (dst->h1 == HD_AUTO) dst->h1 = HD_AUTO_ANIM;
+ if (dst->h2 == HD_AUTO) dst->h2 = HD_AUTO_ANIM;
+ }
/* correct values for euler rotation curves
* - they were degrees/10