diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-15 13:34:39 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-15 13:34:39 +0300 |
commit | 39ff5d7eb978d16370c37508c012bd9d319ac348 (patch) | |
tree | c946d43704c1e8122db612da04a488a41fb75aa3 /source/blender/editors/space_graph | |
parent | aed721e01cc4c0f03b03628f8a5898739c7eaf8e (diff) |
Reverting changes made in r25940 with the NLA unmapping.
The reverted code was just blindly restoring the old state of the keyframes; changes to selection state, value changes, handle type, etc. were overridden, and the cases where keyframes were deliberately retimed or otherwise were also ignored.
I'm not sure what problems these changes were meant to be solving, but will reassess the situation when I get more info on this.
Diffstat (limited to 'source/blender/editors/space_graph')
-rw-r--r-- | source/blender/editors/space_graph/graph_draw.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_edit.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_graph/graph_select.c | 17 |
3 files changed, 14 insertions, 26 deletions
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index 4735950c9d1..9681d20c13b 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -819,11 +819,10 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri FCurve *fcu= (FCurve *)ale->key_data; FModifier *fcm= find_active_fmodifier(&fcu->modifiers); AnimData *adt= ANIM_nla_mapping_get(ac, ale); - ListBase nlabackup; /* map keyframes for drawing if scaled F-Curve */ if (adt) - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0); /* draw curve: * - curve line may be result of one or more destructive modifiers or just the raw data, @@ -909,7 +908,7 @@ void graph_draw_curves (bAnimContext *ac, SpaceIpo *sipo, ARegion *ar, View2DGri /* undo mapping of keyframes for drawing if scaled F-Curve */ if (adt) - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0); } /* free list of curves */ diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c index 1bae3686fe2..2adf783b338 100644 --- a/source/blender/editors/space_graph/graph_edit.c +++ b/source/blender/editors/space_graph/graph_edit.c @@ -1557,11 +1557,9 @@ static int graphkeys_framejump_exec(bContext *C, wmOperator *op) AnimData *adt= ANIM_nla_mapping_get(&ac, ale); if (adt) { - ListBase nlabackup; - - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 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, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, bezt_calc_average, NULL); @@ -1647,11 +1645,9 @@ static void snap_graph_keys(bAnimContext *ac, short mode) AnimData *adt= ANIM_nla_mapping_get(ac, ale); if (adt) { - ListBase nlabackup; - - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 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, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve); @@ -1766,11 +1762,9 @@ static void mirror_graph_keys(bAnimContext *ac, short mode) AnimData *adt= ANIM_nla_mapping_get(ac, ale); if (adt) { - ListBase nlabackup; - - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 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, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, NULL, edit_cb, calchandles_fcurve); diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index b732d17e34f..8d2e2921b7f 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -394,11 +394,9 @@ static void markers_selectkeys_between (bAnimContext *ac) AnimData *adt= ANIM_nla_mapping_get(ac, ale); if (adt) { - ListBase nlabackup; - - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 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, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else { ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); @@ -591,11 +589,10 @@ static short findnearest_fcurve_vert (bAnimContext *ac, int mval[2], FCurve **fc /* try to progressively get closer to the right point... */ if (fcu->bezt) { BezTriple *bezt1=fcu->bezt, *prevbezt=NULL; - ListBase nlabackup; /* apply NLA mapping to all the keyframes */ if (adt) - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); for (i=0; i < fcu->totvert; i++, prevbezt=bezt1, bezt1++) { /* convert beztriple points to screen-space */ @@ -653,7 +650,7 @@ static short findnearest_fcurve_vert (bAnimContext *ac, int mval[2], FCurve **fc /* un-apply NLA mapping from all the keyframes */ if (adt) - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } } @@ -800,11 +797,9 @@ static void graphkeys_mselect_leftright (bAnimContext *ac, short leftright, shor AnimData *adt= ANIM_nla_mapping_get(ac, ale); if (adt) { - ListBase nlabackup; - - ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1); 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, &nlabackup); + ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1); } else ANIM_fcurve_keys_bezier_loop(&bed, ale->key_data, ok_cb, select_cb, NULL); |