Fix for [#26420] F-Curve key handles affected by NLA strip position

* NLA timing was only applied to fcurve keys, but not handles, so strange things happened.
* This time tweaking was missed in selections too, so fcurve handles couldn't be selected properly either if the NLA strip was moved from frame 1.
This commit is contained in:
Janne Karhu
2011-03-09 15:04:09 +00:00
parent f89fc824aa
commit 4fc83c8efa
2 changed files with 6 additions and 6 deletions

View File

@@ -239,7 +239,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
* guess when a callback might use something different
*/
if (adt)
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, incl_handles==0);
/* set horizontal range (if applicable)
* NOTE: these values are only used for x-range and y-range but not region
@@ -269,7 +269,7 @@ static void borderselect_graphkeys (bAnimContext *ac, rcti rect, short mode, sho
/* un-apply NLA mapping from all the keyframes */
if (adt)
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, incl_handles==0);
/* unapply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE|ANIM_UNITCONV_ONLYKEYS);
@@ -987,7 +987,7 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, int mval[2], ListBa
/* apply NLA mapping to all the keyframes */
if (adt)
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 1);
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 0, 0);
if (fcu->bezt) {
BezTriple *bezt1=fcu->bezt, *prevbezt=NULL;
@@ -1020,7 +1020,7 @@ static void get_nearest_fcurve_verts_list (bAnimContext *ac, int mval[2], ListBa
/* un-apply NLA mapping from all the keyframes */
if (adt)
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 1);
ANIM_nla_mapping_apply_fcurve(adt, ale->key_data, 1, 0);
/* unapply unit corrections */
ANIM_unit_mapping_apply_fcurve(ac->scene, ale->id, ale->key_data, ANIM_UNITCONV_RESTORE);

View File

@@ -4858,9 +4858,9 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
((cancelled == 0) || (duplicate)) )
{
if (adt) {
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 1);
ANIM_nla_mapping_apply_fcurve(adt, fcu, 0, 0);
posttrans_fcurve_clean(fcu);
ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 1);
ANIM_nla_mapping_apply_fcurve(adt, fcu, 1, 0);
}
else
posttrans_fcurve_clean(fcu);