lib/middleware/lint.rb in tracksperanto-2.8.0 vs lib/middleware/lint.rb in tracksperanto-2.8.1
- old
+ new
@@ -47,17 +47,20 @@
raise TrackerRestartedError.new(name) if @in_tracker
@in_tracker = true
@last_tracker_name = name
@keyframes = 0
- @last_frame = 0
+ @last_frame = nil
super
end
def export_point(frame, abs_float_x, abs_float_y, float_residual)
@keyframes += 1
- raise NonSequentialKeyframes, [@last_tracker_name, @last_frame, frame] if @last_frame > frame
+ if @last_frame
+ raise NonSequentialKeyframes, [@last_tracker_name, @last_frame, frame] if @last_frame > frame
+ end
@last_frame = frame
+
super
end
def end_tracker_segment
raise EmptyTrackerSentError.new(@last_tracker_name) if @keyframes.zero?
\ No newline at end of file