Added a check to make sure repeat value isn't 0.
authorJoshua Leung <aligorith@gmail.com>
Tue, 22 Apr 2008 03:43:14 +0000 (03:43 +0000)
committerJoshua Leung <aligorith@gmail.com>
Tue, 22 Apr 2008 03:43:14 +0000 (03:43 +0000)
source/blender/blenkernel/intern/action.c

index 76ee7c5975050bacc71e4da6180aa07a9a137723..3025667aa32b91e88d140c59dc32a49db0d8a4ec 100644 (file)
@@ -489,9 +489,10 @@ 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;
        repeat = (strip->flag & ACTSTRIP_USESTRIDE) ? (1.0f) : (strip->repeat);
-       if(strip->scale == 0.0f) strip->scale= 1.0f;
        
+       if(strip->scale == 0.0f) strip->scale= 1.0f;
        scale = abs(strip->scale); /* scale must be positive (for now) */
        
        actlength = strip->actend-strip->actstart;