diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-05-06 11:10:30 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-05-06 11:10:30 +0400 |
commit | ee87af1e16f4aef7a8427b55100f545168608c9d (patch) | |
tree | c87c278c0f505a30ad117d944944f754913cc9ac /source/blender/blenkernel/intern/action.c | |
parent | 2b1797d07bfd4549b3c74a127aeb1fa8460dfb87 (diff) |
Bugfixes:
* NLA scaling was being incorrectly handled with fractional values. This was caused by clamping to integers instead of floats when making sure the scale value was positive.
* Added checks to help prevent some weird cases that may sometimes occur and cause problems
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index c4df1db7627..5fb3d6f869a 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -489,11 +489,11 @@ static float get_actionstrip_frame(bActionStrip *strip, float cframe, int invert { float length, actlength, repeat, scale; - if(strip->repeat == 0.0f) strip->repeat = 1.0f; + if (strip->repeat == 0.0f) strip->repeat = 1.0f; repeat = (strip->flag & ACTSTRIP_USESTRIDE) ? (1.0f) : (strip->repeat); - if(strip->scale == 0.0f) strip->scale= 1.0f; - scale = abs(strip->scale); /* scale must be positive (for now) */ + if (strip->scale == 0.0f) strip->scale= 1.0f; + scale = fabs(strip->scale); /* scale must be positive (for now) */ actlength = strip->actend-strip->actstart; if (actlength == 0.0f) actlength = 1.0f; |