lib/import/maya_live.rb in tracksperanto-2.1.1 vs lib/import/maya_live.rb in tracksperanto-2.2.0

- old
+ new

@@ -13,27 +13,27 @@ true end COMMENT = /^# / - def stream_parse(original_io) - io = Tracksperanto::ExtIO.new(original_io) + def each + io = Tracksperanto::ExtIO.new(@io) extract_width_height_and_aspect(io.gets_non_empty) while line = io.gets_and_strip if line =~ COMMENT - send_tracker(@last_tracker) if @last_tracker + yield(@last_tracker) if @last_tracker @last_tracker = Tracksperanto::Tracker.new(:name => line.gsub(/#{COMMENT} Name(\s+)/, '')) next end tracker_num, frame, x, y, residual = line.split abs_x, abs_y = aspect_values_to_pixels(x, y) @last_tracker.keyframe! :frame => frame, :abs_x => abs_x, :abs_y => abs_y, :residual => set_residual(residual) end - send_tracker(@last_tracker) if @last_tracker + yield(@last_tracker) if @last_tracker end private def aspect_values_to_pixels(x, y) \ No newline at end of file