drone: Reset transformed frames before transform in animation

This commit is contained in:
Arthur Golubtsov
2020-06-18 14:45:36 +01:00
parent 21bd645a55
commit 6e47118dfb

View File

@@ -297,6 +297,7 @@ class Animation(object):
except (ValueError, KeyError):
self.set_state("Can't transform animation: bad or empty config (ratio in 'ANIMATION')", log_error=True)
return
self.transformed_frames = []
self.transformed_frames = copy.deepcopy(self.original_frames)
for frame in self.transformed_frames:
frame.x = x_ratio*frame.x + x0