Class: Tracksperanto::Import::SyntheyesAllTrackerPaths

Inherits:
Base
  • Object
show all
Defined in:
lib/import/syntheyes_all_tracker_paths.rb

Constant Summary collapse

CHARACTERS_OR_QUOTES =
/[AZaz"]/
TRACKER_KEYFRAME =
/^(\d+) ((\d+)\.(\d+)) ((\d+)\.(\d+))/

Instance Attribute Summary

Attributes inherited from Base

#height, #io, #progress_block, #width

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

autodetects_size?, distinct_file_ext, inherited, #report_progress

Methods included from BlockInit

#initialize

Methods included from ZipTuples

#zip_curve_tuples

Methods included from ConstName

#const_name

Methods included from Safety

#safe_reader

Methods included from Casts

#cast_to_bool, #cast_to_float, #cast_to_int, #cast_to_string

Class Method Details

.human_nameObject



2
3
4
# File 'lib/import/syntheyes_all_tracker_paths.rb', line 2

def self.human_name
  "Syntheyes \"All Tracker Paths\" export .txt file"
end

.known_snagsObject



9
10
11
12
13
# File 'lib/import/syntheyes_all_tracker_paths.rb', line 9

def self.known_snags
  "Syntheyes has two formats for exporting tracks. One is called \"Tracker 2-D paths\" in the menu. " +
  "The other is called \"All Tracker Paths\". You told Tracksperanto to treat your file as " +
  "\"All Tracker Paths\", if something goes wrong might be a good idea to try the other Tracksperanto input format"
end

Instance Method Details

#eachObject



16
17
18
19
20
21
22
23
24
25
# File 'lib/import/syntheyes_all_tracker_paths.rb', line 16

def each
  t = Tracksperanto::Tracker.new
  while line = @io.gets do
    if line =~ CHARACTERS_OR_QUOTES
      t = Tracksperanto::Tracker.new(:name => line)
      fill_tracker(t, @io)
      yield(t)
    end
  end
end