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/animation/anim_draw.c | |
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/animation/anim_draw.c')
-rw-r--r-- | source/blender/editors/animation/anim_draw.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_draw.c b/source/blender/editors/animation/anim_draw.c index 6d079fe148a..f7702379645 100644 --- a/source/blender/editors/animation/anim_draw.c +++ b/source/blender/editors/animation/anim_draw.c @@ -270,8 +270,8 @@ void ANIM_nla_mapping_draw(gla2DDrawInfo *di, AnimData *adt, short restore) gla2DGetMap(di, &stored); map= stored; - map.xmin= BKE_nla_tweakedit_remap(adt, map.xmin, 0); - map.xmax= BKE_nla_tweakedit_remap(adt, map.xmax, 0); + map.xmin= BKE_nla_tweakedit_remap(adt, map.xmin, NLATIME_CONVERT_MAP); + map.xmax= BKE_nla_tweakedit_remap(adt, map.xmax, NLATIME_CONVERT_MAP); if (map.xmin == map.xmax) map.xmax += 1.0f; gla2DSetMap(di, &map); @@ -289,11 +289,11 @@ static short bezt_nlamapping_restore(BeztEditData *bed, BezTriple *bezt) /* adjust BezTriple handles only if allowed to */ if (only_keys == 0) { - bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], 0); - bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], 0); + bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_UNMAP); + bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_UNMAP); } - bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], 0); + bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_UNMAP); return 0; } @@ -307,11 +307,11 @@ static short bezt_nlamapping_apply(BeztEditData *bed, BezTriple *bezt) /* adjust BezTriple handles only if allowed to */ if (only_keys == 0) { - bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], 1); - bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], 1); + bezt->vec[0][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[0][0], NLATIME_CONVERT_MAP); + bezt->vec[2][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[2][0], NLATIME_CONVERT_MAP); } - bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], 1); + bezt->vec[1][0]= BKE_nla_tweakedit_remap(adt, bezt->vec[1][0], NLATIME_CONVERT_MAP); return 0; } |