lib/import/match_mover.rb in tracksperanto-1.8.1 vs lib/import/match_mover.rb in tracksperanto-1.8.2
- old
+ new
@@ -19,10 +19,11 @@
end
private
def detect_format(io)
+ report_progress("Detecting width and height")
lines = (0..2).map{ io.gets }
last_line = lines[-1]
w, h, _ = last_line.scan(/(\d+)/).flatten
@width, @height = w.to_i, h.to_i
end
@@ -35,13 +36,15 @@
tracks
end
def extract_track(start_line, io)
tracker_name = start_line.scan(/\"([^\"]+)\"/).flatten[0]
+ report_progress("Extracting tracker #{tracker_name}")
t = Tracksperanto::Tracker.new(:name => tracker_name)
while(line = io.gets) do
return t if line =~ /\}/
t.keyframes.push(extract_key(line.strip)) if line =~ /^(\s+?)(\d)/
+ report_progress("Extracting keyframe")
end
raise "Track didn't close"
end
LINE_PATTERN = /(\d+)(\s+)([\-\d\.]+)(\s+)([\-\d\.]+)(\s+)(.+)/
\ No newline at end of file