lib/import/syntheyes.rb in tracksperanto-2.1.1 vs lib/import/syntheyes.rb in tracksperanto-2.2.0
- old
+ new
@@ -3,17 +3,17 @@
def self.human_name
"Syntheyes 2D tracker paths file"
end
- def stream_parse(io)
- io.each_line do | line |
+ def each
+ @io.each_line do | line |
name, frame, x, y, frame_status = line.split
# Do we already have this tracker?
unless @last_tracker && @last_tracker.name == name
- send_tracker(@last_tracker) if @last_tracker
+ yield(@last_tracker) if @last_tracker
report_progress("Allocating tracker #{name}")
@last_tracker = Tracksperanto::Tracker.new{|t| t.name = name }
end
# Add the keyframe
@@ -24,9 +24,9 @@
end
@last_tracker.push(k)
report_progress("Adding keyframe #{frame} to #{name}")
end
- send_tracker(@last_tracker) if @last_tracker && @last_tracker.any?
+ yield(@last_tracker) if @last_tracker && @last_tracker.any?
end
end
\ No newline at end of file