diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-03-08 14:08:24 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-03-08 14:08:24 +0300 |
commit | 19ec73c908a2cb05104bea49afdb0b4c7452443f (patch) | |
tree | a47d0e3cf2800aad0e38284e8c19c191705612f7 /source | |
parent | b5cdd1f2d6e834dde4a0cdbec1a1bf2874e8a88d (diff) |
Bugfix:
Time-Slide transform tool in the Action Editor now works as well as it did before the Action-Keys transform refactor. However, numeric input is now broken as a side-effect of this.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/transform.c | 9 | ||||
-rw-r--r-- | source/blender/src/transform_conversions.c | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/src/transform.c b/source/blender/src/transform.c index 72d4c418b80..0f0fe4697e0 100644 --- a/source/blender/src/transform.c +++ b/source/blender/src/transform.c @@ -4353,12 +4353,15 @@ static void applyTimeSlide(TransInfo *t, float sval) float minx= *((float *)(t->customData)); float maxx= *((float *)(t->customData) + 1); + /* set value for drawing black line */ if (t->spacetype == SPACE_ACTION) { - G.saction->timeslide= t->fac; + float cvalf = t->fac; if (NLA_ACTION_SCALED) - sval= get_action_frame(OBACT, sval); + cvalf= get_action_frame(OBACT, cvalf); + + G.saction->timeslide= cvalf; } /* it doesn't matter whether we apply to t->data or t->data2d, but t->data2d is more convenient */ @@ -4374,7 +4377,7 @@ static void applyTimeSlide(TransInfo *t, float sval) cval= get_action_frame(ob, cval); /* only apply to data if in range */ - if (sval > minx && sval < maxx) { + if ((sval > minx) && (sval < maxx)) { float cvalc= CLAMPIS(cval, minx, maxx); float timefac; diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 3912ca3453e..45e75bff39b 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -2653,7 +2653,7 @@ static void createTransActionData(TransInfo *t) /* check if we're supposed to be setting minx/maxx for TimeSlide */ if (t->mode == TFM_TIME_SLIDE) { - float min = 0, max = 0; + float min=999999999.0f, max=-999999999.0; int i; td= (t->data + 1); |