lib/import/boujou.rb in tracksperanto-2.1.1 vs lib/import/boujou.rb in tracksperanto-2.2.0
- old
+ new
@@ -2,17 +2,17 @@
def self.human_name
"Boujou feature tracks export"
end
- def stream_parse(io)
- wrapped_io = Tracksperanto::ExtIO.new(io)
+ def each
+ wrapped_io = Tracksperanto::ExtIO.new(@io)
detect_columns(wrapped_io)
trackers = {}
filtering_trackers_from(wrapped_io) do | name, frame, x, y |
if @last_tracker && (name != @last_tracker.name)
- send_tracker(@last_tracker) if @last_tracker && @last_tracker.any?
+ yield(@last_tracker) if @last_tracker && @last_tracker.any?
@last_tracker = nil
end
if !@last_tracker
@last_tracker = Tracksperanto::Tracker.new(:name => name)
@@ -20,10 +20,10 @@
report_progress("Extracting frame #{frame} of #{name}")
@last_tracker.keyframe!(:frame => (frame.to_i - 1), :abs_y => (@height.to_f - y.to_f), :abs_x => x)
end
- send_tracker(@last_tracker) if @last_tracker && @last_tracker.any?
+ yield(@last_tracker) if @last_tracker && @last_tracker.any?
end
private
COMMENT = /^# /
\ No newline at end of file