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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-13 00:20:09 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-01-13 00:20:09 +0300
commitb39be6007576021fb377343cd880bfcc44b77031 (patch)
tree90ef38312c85bb513413b41484db98030de07e33 /source/blender/editors/space_action
parent63e80e271dd3f9f79fe3a85c10253ee6eea2ba4e (diff)
NLA: fix keyframes getting messed up when making strips longer. For drawing
and other operations the nla mapping would be applied to the curves, but not restored correctly. The unmap function was not the inverse of the map function, and it's not clear to me it's even possible to make it so due to repeat, so now the old coordinates are backed up in a list and then restored afterwards.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r--source/blender/editors/space_action/action_edit.c19
-rw-r--r--source/blender/editors/space_action/action_select.c12
2 files changed, 20 insertions, 11 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index 687e7c53644..b35f9594397 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -1133,11 +1133,12 @@ static int actkeys_framejump_exec(bContext *C, wmOperator *op)
for (ale= anim_data.first; ale; ale= ale->next) {
AnimData *adt= ANIM_nla_mapping_get(&ac, ale);
-
if (adt) {
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ListBase nlabackup;
+
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1, &nlabackup);
}
else
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL);
@@ -1215,9 +1216,11 @@ static void snap_action_keys(bAnimContext *ac, short mode)
AnimData *adt= ANIM_nla_mapping_get(ac, ale);
if (adt) {
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ListBase nlabackup;
+
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1, &nlabackup);
}
//else if (ale->type == ACTTYPE_GPLAYER)
// snap_gplayer_frames(ale->data, mode);
@@ -1332,9 +1335,11 @@ static void mirror_action_keys(bAnimContext *ac, short mode)
AnimData *adt= ANIM_nla_mapping_get(ac, ale);
if (adt) {
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ListBase nlabackup;
+
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve);
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1, &nlabackup);
}
//else if (ale->type == ACTTYPE_GPLAYER)
// snap_gplayer_frames(ale->data, mode);
diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c
index 8eeed6da100..9155f57c7a0 100644
--- a/source/blender/editors/space_action/action_select.c
+++ b/source/blender/editors/space_action/action_select.c
@@ -417,9 +417,11 @@ static void markers_selectkeys_between (bAnimContext *ac)
AnimData *adt= ANIM_nla_mapping_get(ac, ale);
if (adt) {
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ListBase nlabackup;
+
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1, &nlabackup);
}
else {
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
@@ -663,9 +665,11 @@ static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short
AnimData *adt= ANIM_nla_mapping_get(ac, ale);
if (adt) {
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
+ ListBase nlabackup;
+
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup);
ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL);
- ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
+ ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1, &nlabackup);
}
//else if (ale->type == ANIMTYPE_GPLAYER)
// borderselect_gplayer_frames(ale->data, min, max, SELECT_ADD);