Wednesday merger of Orange branch and bf-blender
[blender-staging.git] / source / blender / blenkernel / intern / action.c
index c21a9463767290c9abb61990d2980e69f0357761..d6bca577013e609949527973e40a742e07bb4fad 100644 (file)
@@ -910,8 +910,10 @@ static void do_nla(Object *ob, int blocktype)
                                else{
                                        if (strip->flag & ACTSTRIP_HOLDLASTFRAME){
                                                /* we want the strip to hold on the exact fraction of the repeat value */
+                                               
                                                frametime = actlength * (strip->repeat-(int)strip->repeat);
-                                               frametime= bsystem_time(ob, 0, frametime, 0.0);
+                                               if(frametime<=0.000001f) frametime= actlength;  /* rounding errors... */
+                                               frametime= bsystem_time(ob, 0, frametime+strip->actstart, 0.0);
                                                
                                                if(blocktype==ID_AR)
                                                        extract_pose_from_action (tpose, strip->act, frametime);