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/transform/transform.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/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index ded6edbbb0e..9d8371afd61 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -4365,7 +4365,7 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, AnimData *adt, sho /* convert frame to nla-action time (if needed) */ if (adt) - val= BKE_nla_tweakedit_remap(adt, *(td->val), 1); + val= BKE_nla_tweakedit_remap(adt, *(td->val), NLATIME_CONVERT_MAP); else val= *(td->val); @@ -4377,7 +4377,7 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, AnimData *adt, sho /* convert frame out of nla-action time */ if (adt) - *(td->val)= BKE_nla_tweakedit_remap(adt, val, 0); + *(td->val)= BKE_nla_tweakedit_remap(adt, val, NLATIME_CONVERT_UNMAP); else *(td->val)= val; } @@ -4387,7 +4387,7 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, AnimData *adt, sho /* convert frame to nla-action time (if needed) */ if (adt) - val= BKE_nla_tweakedit_remap(adt, *(td->val), 1); + val= BKE_nla_tweakedit_remap(adt, *(td->val), NLATIME_CONVERT_MAP); else val= *(td->val); @@ -4397,7 +4397,7 @@ static void doAnimEdit_SnapFrame(TransInfo *t, TransData *td, AnimData *adt, sho /* convert frame out of nla-action time */ if (adt) - *(td->val)= BKE_nla_tweakedit_remap(adt, val, 0); + *(td->val)= BKE_nla_tweakedit_remap(adt, val, NLATIME_CONVERT_UNMAP); else *(td->val)= val; } @@ -4487,9 +4487,9 @@ static void applyTimeTranslate(TransInfo *t, float sval) deltax= (float)( floor(deltax + 0.5f) ); } - val = BKE_nla_tweakedit_remap(adt, td->ival, 1); + val = BKE_nla_tweakedit_remap(adt, td->ival, NLATIME_CONVERT_MAP); val += deltax; - *(td->val) = BKE_nla_tweakedit_remap(adt, val, 0); + *(td->val) = BKE_nla_tweakedit_remap(adt, val, NLATIME_CONVERT_UNMAP); } else { deltax = val = t->values[0]; @@ -4614,7 +4614,7 @@ static void applyTimeSlide(TransInfo *t, float sval) /* apply NLA-mapping to necessary values */ if (adt) - cval= BKE_nla_tweakedit_remap(adt, cval, 0); + cval= BKE_nla_tweakedit_remap(adt, cval, NLATIME_CONVERT_UNMAP); /* only apply to data if in range */ if ((sval > minx) && (sval < maxx)) { @@ -4726,7 +4726,7 @@ static void applyTimeScale(TransInfo *t) { /* check if any need to apply nla-mapping */ if (adt) - startx= BKE_nla_tweakedit_remap(adt, startx, 0); + startx= BKE_nla_tweakedit_remap(adt, startx, NLATIME_CONVERT_UNMAP); /* now, calculate the new value */ *(td->val) = td->ival - startx; |