lib/import/pftrack.rb in tracksperanto-2.12.0 vs lib/import/pftrack.rb in tracksperanto-3.0.0

- old
+ new

@@ -1,8 +1,11 @@ # -*- encoding : utf-8 -*- # TODO: this should be rewritten as a proper state-machine parser class Tracksperanto::Import::PFTrack < Tracksperanto::Import::Base + + include Tracksperanto::PFCoords + def self.human_name "PFTrack/PFMatchit .2dt file" end def self.distinct_file_ext @@ -71,10 +74,10 @@ def extract_tracker(num_of_keyframes, t, io) (1..num_of_keyframes).map do | keyframe_idx | report_progress("Reading keyframe #{keyframe_idx} of #{num_of_keyframes} in #{t.name}") f, x, y, residual = io.gets.chomp.split - t.keyframe!(:frame => f, :abs_x => x, :abs_y => y, :residual => residual.to_f * 8) + t.keyframe!(:frame => f, :abs_x => from_pfcoord(x), :abs_y => from_pfcoord(y), :residual => residual.to_f * 8) end end def unquote(s) s.gsub(/"/, '')