tracksperanto 1.0.6 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -60,9 +60,8 @@ class FlameImportTest < Test::Unit::TestCase
60
60
  name = "foo/bar"
61
61
  c = Tracksperanto::Import::FlameStabilizer::ChannelBlock.new(io, name)
62
62
 
63
- assert_equal 1, c.length
64
- assert_in_delta 10.0, c[0].value, DELTA
65
- assert_equal 1, c[0].frame
63
+ assert_equal 0, c.length
64
+ assert_in_delta 10.0, c.base_value, DELTA
66
65
  end
67
66
 
68
67
  def test_channel_block_for_channel_with_5_keyframes
@@ -102,9 +101,9 @@ class FlameImportTest < Test::Unit::TestCase
102
101
 
103
102
  first_k = first_t.keyframes[1]
104
103
 
105
- assert_equal 2, first_k.frame
106
- assert_in_delta 1022.82062, first_k.abs_x, DELTA
107
- assert_in_delta 586.82, first_k.abs_y, DELTA
104
+ assert_equal 1, first_k.frame
105
+ assert_in_delta 771.58, first_k.abs_x, DELTA
106
+ assert_in_delta 107.98192, first_k.abs_y, DELTA
108
107
  end
109
108
 
110
109
  def test_parsing_another_track
@@ -118,4 +117,29 @@ class FlameImportTest < Test::Unit::TestCase
118
117
 
119
118
  assert_equal 20, trackers.length
120
119
  end
120
+
121
+ def test_simple_from_combustion
122
+ fixture = File.read(File.dirname(__FILE__) + '/samples/fromCombustion_fromMidClip_wSnap.stabilizer')
123
+
124
+ parser = Tracksperanto::Import::FlameStabilizer.new
125
+
126
+ trackers = parser.parse(fixture)
127
+ assert_equal 1280, parser.width
128
+ assert_equal 540, parser.height
129
+
130
+ assert_equal 1, trackers.length
131
+
132
+ t = trackers.shift
133
+ assert_equal 232, t.keyframes.length
134
+
135
+ first_kf = t.keyframes[0]
136
+
137
+ assert_equal 0, first_kf.frame
138
+ assert_in_delta 387.7752, first_kf.abs_x, DELTA
139
+ assert_in_delta 514.4738, first_kf.abs_y, DELTA
140
+
141
+ frame_149 = t.keyframes[148]
142
+ assert_in_delta 390.267, frame_149.abs_x, DELTA
143
+ assert_in_delta 280.248, frame_149.abs_y, DELTA
144
+ end
121
145
  end
@@ -13,6 +13,11 @@ class KeyframeTest < Test::Unit::TestCase
13
13
  assert_equal 12.5, keyframe.abs_y
14
14
  end
15
15
 
16
+ def test_inspect
17
+ kf = Tracksperanto::Keyframe.new(:frame => 0, :abs_x => 10, :abs_y => 12.0)
18
+ assert_equal "[0, 10.0, 12.0]", kf.inspect
19
+ end
20
+
16
21
  def test_frame_translated_to_int
17
22
  kf = Tracksperanto::Keyframe.new {|k| k.frame = '0' }
18
23
  assert_equal 0, kf.frame
@@ -3,17 +3,17 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = %q{tracksperanto}
6
- s.version = "1.0.5"
6
+ s.version = "1.1.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
9
  s.authors = ["Julik Tarkhanov"]
10
- s.date = %q{2009-09-06}
10
+ s.date = %q{2009-09-07}
11
11
  s.default_executable = %q{tracksperanto}
12
12
  s.description = %q{Tracksperanto is a universal 2D-track translator between many apps. Import support: * Shake script (one tracker node per tracker) * Shake tracker node export (textfile with many tracks per file), also exported by Boujou and others * PFTrack 2dt files * Syntheyes 2D tracking data exports (UV coordinates) Export support: * Shake text file (many trackers per file), also accepted by Boujou * PFTrack 2dt file (with residuals) * Syntheyes 2D tracking data import (UV coordinates) The main way to use Tracksperanto is to use the supplied "tracksperanto" binary, like so: tracksperanto -f ShakeScript -w 1920 -h 1080 /Films/Blockbuster/Shots/001/script.shk ShakeScript is the name of the translator that will be used to read the file (many apps export tracks as .txt files so there is no way for us to autodetect them all). -w and -h stand for Width and Height and define the size of your comp (different tracking apps use different coordinate systems and we need to know the size of the comp to properly convert these). You also have additional options like -xs, -ys and --slip - consult the usage info for the tracksperanto binary. The converted files will be saved in the same directory as the source, if resulting converted files already exist ++they will be overwritten without warning++.}
13
13
  s.email = ["me@julik.nl"]
14
14
  s.executables = ["tracksperanto"]
15
- s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt", "test/samples/].txt", "test/samples/flyover2DP_syntheyes.txt", "test/samples/one_shake_tracker.txt", "test/samples/one_shake_tracker_from_first.txt", "test/samples/shake_tracker_nodes_to_syntheyes.txt", "test/samples/two_shake_trackers.txt"]
16
- s.files = [".DS_Store", "History.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/tracksperanto", "lib/.DS_Store", "lib/export/base.rb", "lib/export/flame_stabilizer.rb", "lib/export/mux.rb", "lib/export/pftrack.rb", "lib/export/shake_text.rb", "lib/export/syntheyes.rb", "lib/import/base.rb", "lib/import/flame_stabilizer.rb", "lib/import/pftrack.rb", "lib/import/shake_script.rb", "lib/import/shake_text.rb", "lib/import/syntheyes.rb", "lib/middleware/base.rb", "lib/middleware/close.rb", "lib/middleware/golden.rb", "lib/middleware/scaler.rb", "lib/middleware/slipper.rb", "lib/pipeline/base.rb", "lib/tracksperanto.rb", "test/.DS_Store", "test/helper.rb", "test/samples/.DS_Store", "test/samples/].txt", "test/samples/flyover2DP_syntheyes.txt", "test/samples/hugeFlameSetup.stabilizer", "test/samples/megaTrack.action.3dtrack.stabilizer", "test/samples/one_shake_tracker.txt", "test/samples/one_shake_tracker_from_first.txt", "test/samples/shake_tracker_nodes.shk", "test/samples/shake_tracker_nodes_to_syntheyes.txt", "test/samples/sourcefile_pftrack.2dt", "test/samples/three_tracks_in_one_stabilizer.shk", "test/samples/two_shake_trackers.txt", "test/samples/two_tracks_in_one_tracker.shk", "test/test_flame_block.rb", "test/test_keyframe.rb", "test/test_pftrack_import.rb", "test/test_shake_export.rb", "test/test_shake_script_import.rb", "test/test_shake_text_import.rb", "test/test_syntheyes_import.rb", "tracksperanto.gemspec"]
15
+ s.extra_rdoc_files = ["History.txt", "Manifest.txt", "README.txt"]
16
+ s.files = [".DS_Store", "History.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/tracksperanto", "lib/.DS_Store", "lib/export/base.rb", "lib/export/mux.rb", "lib/export/pftrack.rb", "lib/export/shake_text.rb", "lib/export/syntheyes.rb", "lib/import/base.rb", "lib/import/flame_stabilizer.rb", "lib/import/pftrack.rb", "lib/import/shake_script.rb", "lib/import/shake_text.rb", "lib/import/syntheyes.rb", "lib/middleware/base.rb", "lib/middleware/close.rb", "lib/middleware/golden.rb", "lib/middleware/reformat.rb", "lib/middleware/scaler.rb", "lib/middleware/slipper.rb", "lib/pipeline/base.rb", "lib/tracksperanto.rb", "test/.DS_Store", "test/helper.rb", "test/samples/.DS_Store", "test/samples/flyover2DP_syntheyes.txt", "test/samples/fromCombustion_fromMidClip_wSnap.stabilizer", "test/samples/hugeFlameSetup.stabilizer", "test/samples/megaTrack.action.3dtrack.stabilizer", "test/samples/one_shake_tracker.txt", "test/samples/one_shake_tracker_from_first.txt", "test/samples/shake_tracker_nodes.shk", "test/samples/shake_tracker_nodes_to_syntheyes.txt", "test/samples/sourcefile_pftrack.2dt", "test/samples/three_tracks_in_one_stabilizer.shk", "test/samples/two_shake_trackers.txt", "test/samples/two_tracks_in_one_tracker.shk", "test/test_flame_import.rb", "test/test_keyframe.rb", "test/test_pftrack_import.rb", "test/test_shake_export.rb", "test/test_shake_script_import.rb", "test/test_shake_text_import.rb", "test/test_syntheyes_import.rb", "tracksperanto.gemspec"]
17
17
  s.has_rdoc = true
18
18
  s.homepage = %q{http://guerilla-di.org/tracksperanto}
19
19
  s.rdoc_options = ["--main", "README.txt"]
@@ -21,18 +21,18 @@ Gem::Specification.new do |s|
21
21
  s.rubyforge_project = %q{guerilla-di}
22
22
  s.rubygems_version = %q{1.3.1}
23
23
  s.summary = %q{Tracksperanto is a universal 2D-track translator between many apps}
24
- s.test_files = ["test/test_flame_block.rb", "test/test_keyframe.rb", "test/test_pftrack_import.rb", "test/test_shake_export.rb", "test/test_shake_script_import.rb", "test/test_shake_text_import.rb", "test/test_syntheyes_import.rb"]
24
+ s.test_files = ["test/test_flame_import.rb", "test/test_keyframe.rb", "test/test_pftrack_import.rb", "test/test_shake_export.rb", "test/test_shake_script_import.rb", "test/test_shake_text_import.rb", "test/test_syntheyes_import.rb"]
25
25
 
26
26
  if s.respond_to? :specification_version then
27
27
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
28
28
  s.specification_version = 2
29
29
 
30
30
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
31
- s.add_development_dependency(%q<hoe>, [">= 1.8.3"])
31
+ s.add_development_dependency(%q<hoe>, [">= 2.3.3"])
32
32
  else
33
- s.add_dependency(%q<hoe>, [">= 1.8.3"])
33
+ s.add_dependency(%q<hoe>, [">= 2.3.3"])
34
34
  end
35
35
  else
36
- s.add_dependency(%q<hoe>, [">= 1.8.3"])
36
+ s.add_dependency(%q<hoe>, [">= 2.3.3"])
37
37
  end
38
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracksperanto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-09-06 00:00:00 +02:00
12
+ date: 2009-09-07 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.8.3
23
+ version: 2.3.3
24
24
  version:
25
25
  description: "Tracksperanto is a universal 2D-track translator between many apps. Import support: * Shake script (one tracker node per tracker) * Shake tracker node export (textfile with many tracks per file), also exported by Boujou and others * PFTrack 2dt files * Syntheyes 2D tracking data exports (UV coordinates) Export support: * Shake text file (many trackers per file), also accepted by Boujou * PFTrack 2dt file (with residuals) * Syntheyes 2D tracking data import (UV coordinates) The main way to use Tracksperanto is to use the supplied \"tracksperanto\" binary, like so: tracksperanto -f ShakeScript -w 1920 -h 1080 /Films/Blockbuster/Shots/001/script.shk ShakeScript is the name of the translator that will be used to read the file (many apps export tracks as .txt files so there is no way for us to autodetect them all). -w and -h stand for Width and Height and define the size of your comp (different tracking apps use different coordinate systems and we need to know the size of the comp to properly convert these). You also have additional options like -xs, -ys and --slip - consult the usage info for the tracksperanto binary. The converted files will be saved in the same directory as the source, if resulting converted files already exist ++they will be overwritten without warning++."
26
26
  email:
@@ -33,11 +33,6 @@ extra_rdoc_files:
33
33
  - History.txt
34
34
  - Manifest.txt
35
35
  - README.txt
36
- - test/samples/flyover2DP_syntheyes.txt
37
- - test/samples/one_shake_tracker.txt
38
- - test/samples/one_shake_tracker_from_first.txt
39
- - test/samples/shake_tracker_nodes_to_syntheyes.txt
40
- - test/samples/two_shake_trackers.txt
41
36
  files:
42
37
  - .DS_Store
43
38
  - History.txt
@@ -47,7 +42,6 @@ files:
47
42
  - bin/tracksperanto
48
43
  - lib/.DS_Store
49
44
  - lib/export/base.rb
50
- - lib/export/flame_stabilizer.rb
51
45
  - lib/export/mux.rb
52
46
  - lib/export/pftrack.rb
53
47
  - lib/export/shake_text.rb
@@ -61,6 +55,7 @@ files:
61
55
  - lib/middleware/base.rb
62
56
  - lib/middleware/close.rb
63
57
  - lib/middleware/golden.rb
58
+ - lib/middleware/reformat.rb
64
59
  - lib/middleware/scaler.rb
65
60
  - lib/middleware/slipper.rb
66
61
  - lib/pipeline/base.rb
@@ -69,6 +64,7 @@ files:
69
64
  - test/helper.rb
70
65
  - test/samples/.DS_Store
71
66
  - test/samples/flyover2DP_syntheyes.txt
67
+ - test/samples/fromCombustion_fromMidClip_wSnap.stabilizer
72
68
  - test/samples/hugeFlameSetup.stabilizer
73
69
  - test/samples/megaTrack.action.3dtrack.stabilizer
74
70
  - test/samples/one_shake_tracker.txt
@@ -1,50 +0,0 @@
1
- class Tracksperanto::Export::FlameStabilizer < Tracksperanto::Export::Base
2
- PREAMBLE = '' #__DATA__.read
3
-
4
- # Should return the suffix and extension of this export file (like "_flame.stabilizer")
5
- def self.desc_and_extension
6
- "flame.stabilizer"
7
- end
8
-
9
- def start_export(w, h)
10
- @width = w, @height = h
11
- end
12
-
13
- def start_tracker_segment(tracker_name)
14
- @tracker_count ||= 0
15
- @tracker_count += 1
16
- end
17
-
18
- def end_export
19
- preamble = PREAMBLE % [ @tracker_count, @width, @height]
20
- end
21
-
22
- def export_point(frame, abs_float_x, abs_float_y, float_residual)
23
- end
24
- end
25
-
26
- __END__
27
- StabilizerFileVersion 5.0
28
- CreationDate Tue Dec 9 21:02:02 2008
29
-
30
-
31
- NbTrackers %d
32
- Selected 0
33
- FrameWidth %d
34
- FrameHeight %d
35
- AutoKey yes
36
- MotionPath yes
37
- Icons yes
38
- AutoPan no
39
- EditMode 1
40
- Format 0
41
- Padding
42
- Red 0
43
- Green 0
44
- Blue 0
45
- Oversampling no
46
- Opacity 50
47
- Zoom 3
48
- Field no
49
- Backward no
50
- Anim