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
path: root/source
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-10-14 06:18:59 +0400
committerJoshua Leung <aligorith@gmail.com>2009-10-14 06:18:59 +0400
commite87839b6736535584dcffcbd1b9f144ad6e6ee01 (patch)
tree97665531ec43eae95d3b1003cfba1031bdbd3a1b /source
parentadddfffe231b066ed701852b6a378f2f7561d7a4 (diff)
Bugfix: Automerge keyframes was broken - the function call to perform the merging was commented out
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/transform/transform_conversions.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 826fcb0c2dd..f5854a8d9db 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -2890,7 +2890,7 @@ static void posttrans_fcurve_clean (FCurve *fcu)
/* Loop 1: find selected keyframes */
for (i = 0; i < fcu->totvert; i++) {
BezTriple *bezt= &fcu->bezt[i];
-
+
if (BEZSELECTED(bezt)) {
selcache[index]= bezt->vec[1][0];
index++;
@@ -2898,16 +2898,18 @@ static void posttrans_fcurve_clean (FCurve *fcu)
}
}
- /* Loop 2: delete unselected keyframes on the same frames (if any keyframes were found) */
- if (len) {
+ /* Loop 2: delete unselected keyframes on the same frames
+ * (if any keyframes were found, or the whole curve wasn't affected)
+ */
+ if ((len) && (len != fcu->totvert)) {
for (i = 0; i < fcu->totvert; i++) {
BezTriple *bezt= &fcu->bezt[i];
-
+
if (BEZSELECTED(bezt) == 0) {
/* check beztriple should be removed according to cache */
for (index= 0; index < len; index++) {
if (IS_EQ(bezt->vec[1][0], selcache[index])) {
- //delete_icu_key(icu, i, 0);
+ delete_fcurve_key(fcu, i, 0);
break;
}
else if (bezt->vec[1][0] > selcache[index])
@@ -2915,7 +2917,7 @@ static void posttrans_fcurve_clean (FCurve *fcu)
}
}
}
-
+
testhandles_fcurve(fcu);
}
@@ -4561,6 +4563,8 @@ void special_aftertrans_update(TransInfo *t)
if (ANIM_animdata_context_getdata(&ac) == 0)
return;
+ printf("automerge dopesheet keys \n");
+
if (ac.datatype == ANIMCONT_DOPESHEET) {
ListBase anim_data = {NULL, NULL};
bAnimListElem *ale;
@@ -4577,6 +4581,7 @@ void special_aftertrans_update(TransInfo *t)
if ( (saction->flag & SACTION_NOTRANSKEYCULL)==0 &&
((cancelled == 0) || (duplicate)) )
{
+ printf("\tdo fcurve clean \n");
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
posttrans_fcurve_clean(fcu);