X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=blender%2Fio_mspgl%2Fanimation.py;h=ffce11f596fc8099b2e48e39d8401beca84f45d2;hb=aa1ef522b3b2bdde8f005878fed6668f52b8d949;hp=5ad937df196060b934bd1269718beb6833ac76d4;hpb=f2cab83d5704f3f4a91f551f402187637e5063d2;p=libs%2Fgl.git diff --git a/blender/io_mspgl/animation.py b/blender/io_mspgl/animation.py index 5ad937df..ffce11f5 100644 --- a/blender/io_mspgl/animation.py +++ b/blender/io_mspgl/animation.py @@ -65,6 +65,14 @@ class Animation: kf.curves.append((c, i)) self.keyframes.sort(key=lambda k: k.time) + self.start_time = self.keyframes[0].time + + for c in self.curves: + for k in c.knots: + k[0] -= self.start_time + + for k in self.keyframes: + k.time -= self.start_time def __getattr__(self, attr): return getattr(self._curve, attr)