+ def check_looping(self, threshold):
+ self.looping = True
+ for c in self.curves:
+ first_y = c.knots[0][1]
+ last_y = c.knots[-1][1]
+ d = abs(last_y-first_y)
+
+ if c.data_path=="rotation_euler":
+ while d>math.pi/2:
+ d -= math.pi
+ while d<-math.pi/2:
+ d += math.pi
+
+ if d>threshold:
+ self.looping = False
+ break
+