Bugfix #6923:
authorJoshua Leung <aligorith@gmail.com>
Sun, 9 Sep 2007 11:54:12 +0000 (11:54 +0000)
committerJoshua Leung <aligorith@gmail.com>
Sun, 9 Sep 2007 11:54:12 +0000 (11:54 +0000)
NLA was calculating extensions of strips in the wrong order. This was not an issue in many cases, although it is highlighted in the following case:

[strip 1 - 'hold' is on] ----------------------------
                               [strip 2        ]

Logically, the end of strip 1 would hold on until the start of strip 2. However, the start of strip 2 was extended to the end of strip 1 instead.

source/blender/blenkernel/intern/action.c

index cbe056fa1b14876934a029e18f9c923bfb722997..e10a17a3338154defe4e34b48ef4358adfe0dd39 100644 (file)
@@ -1071,10 +1071,10 @@ static void do_nla(Object *ob, int blocktype)
                }
        }
        if(strip==NULL) {       /* extend */
-               if(stripfirst)
-                       scene_cfra= stripfirst->start;
-               else if(striplast)
+               if(striplast)
                        scene_cfra= striplast->end;
+               else if(stripfirst)
+                       scene_cfra= stripfirst->start;
        }
        
        /* and now go over all strips */