diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-06-28 11:32:00 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-06-28 11:32:00 +0400 |
commit | aa4ed13e4a216a3464f7b9d6643c195927aea98a (patch) | |
tree | 89da0c36092b7cea3a17163104dac2e46fd3d58a /source/blender/editors/space_action | |
parent | 500507ddb1efdf9f69d8a61e3d03a855ee017902 (diff) |
NLA SoC: NLA Mapping Cleanup
While trying to fix the mapping conversions for repeat, I came across some limitations with the current (soon to be previous) mapping methods.
Now the mapping conversions should work nicely for all places that use them.
Diffstat (limited to 'source/blender/editors/space_action')
-rw-r--r-- | source/blender/editors/space_action/action_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_action/action_select.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c index 61dbc41e7c8..dd351c92cf2 100644 --- a/source/blender/editors/space_action/action_edit.c +++ b/source/blender/editors/space_action/action_edit.c @@ -121,8 +121,8 @@ static void get_keyframe_extents (bAnimContext *ac, float *min, float *max) calc_fcurve_range(fcu, &tmin, &tmax); if (adt) { - tmin= BKE_nla_tweakedit_remap(adt, tmin, 1); - tmax= BKE_nla_tweakedit_remap(adt, tmax, 1); + tmin= BKE_nla_tweakedit_remap(adt, tmin, NLATIME_CONVERT_MAP); + tmax= BKE_nla_tweakedit_remap(adt, tmax, NLATIME_CONVERT_MAP); } /* try to set cur using these values, if they're more extreme than previously set values */ @@ -406,7 +406,7 @@ static void insert_action_keys(bAnimContext *ac, short mode) /* adjust current frame for NLA-scaling */ if (adt) - cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, 0); + cfra= BKE_nla_tweakedit_remap(adt, (float)CFRA, NLATIME_CONVERT_UNMAP); else cfra= (float)CFRA; diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index 451d120ff9b..d45e32dd3bb 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -255,8 +255,8 @@ static void borderselect_action (bAnimContext *ac, rcti rect, short mode, short if (ELEM(mode, ACTKEYS_BORDERSEL_FRAMERANGE, ACTKEYS_BORDERSEL_ALLKEYS)) { /* if channel is mapped in NLA, apply correction */ if (adt) { - bed.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, 0); - bed.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, 0); + bed.f1= BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP); + bed.f2= BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP); } else { bed.f1= rectf.xmin; @@ -504,7 +504,7 @@ static void columnselect_action_keys (bAnimContext *ac, short mode) for (ce= bed.list.first; ce; ce= ce->next) { /* set frame for validation callback to refer to */ if (adt) - bed.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, 0); + bed.f1= BKE_nla_tweakedit_remap(adt, ce->cfra, NLATIME_CONVERT_UNMAP); else bed.f1= ce->cfra; @@ -707,7 +707,7 @@ static void actkeys_mselect_column(bAnimContext *ac, short select_mode, float se /* set frame for validation callback to refer to */ if (adt) - bed.f1= BKE_nla_tweakedit_remap(adt, selx, 0); + bed.f1= BKE_nla_tweakedit_remap(adt, selx, NLATIME_CONVERT_UNMAP); else bed.f1= selx; @@ -779,8 +779,8 @@ static void mouse_action_keys (bAnimContext *ac, int mval[2], short select_mode, /* apply NLA-scaling correction? */ if (adt) { - xmin= BKE_nla_tweakedit_remap(adt, rectf.xmin, 0); - xmax= BKE_nla_tweakedit_remap(adt, rectf.xmax, 0); + xmin= BKE_nla_tweakedit_remap(adt, rectf.xmin, NLATIME_CONVERT_UNMAP); + xmax= BKE_nla_tweakedit_remap(adt, rectf.xmax, NLATIME_CONVERT_UNMAP); } else { xmin= rectf.xmin; |