tracksperanto 2.2.2 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -84,6 +84,19 @@ class ShakeLexerTest < Test::Unit::TestCase
84
84
  ]],
85
85
  s)
86
86
  end
87
+
88
+ def test_parse_funcall_with_valueats_at_negframes
89
+ s = parse 'Linear(0,716.08@-1,715.846@2)'
90
+ assert_equal(
91
+ [[
92
+ :funcall,
93
+ "Linear",
94
+ 0,
95
+ [:value_at, -1, 716.08],
96
+ [:value_at, 2, 715.846],
97
+ ]],
98
+ s)
99
+ end
87
100
 
88
101
  def test_parse_hermite_valuats_containing_arrays
89
102
  # Hermite curves use array args
@@ -123,4 +123,12 @@ class ShakeScriptImportTest < Test::Unit::TestCase
123
123
  assert_equal 1, trackers.length
124
124
  assert_equal 850, trackers[0].length
125
125
  end
126
+
127
+ def test_tracker_supernode_with_curves_having_keyframes_at_negative_offsets
128
+ fixture = File.open(File.dirname(__FILE__) + "/samples/shake_script/designated_global_range_starting_at_negative_frame.shk")
129
+ trackers = Tracksperanto::Import::ShakeScript.new(:io => fixture, :width => 720, :height => 576).to_a
130
+ assert_equal 33, trackers.length
131
+ assert_equal 145, trackers[0].length
132
+ end
133
+
126
134
  end
@@ -102,6 +102,20 @@ class PipelineTest < Test::Unit::TestCase
102
102
  assert_raise(Tracksperanto::Pipeline::DimensionsRequiredError) { pipeline.run("./input.txt", :importer => "Syntheyes") }
103
103
  end
104
104
 
105
+ def test_importing_file_with_trackers_of_zero_length_does_not_accumulate_any_trackers
106
+ pft_with_empty_trackers = "./import/samples/pftrack5/empty_trackers.2dt"
107
+ i = Tracksperanto::Import::PFTrack.new(:io => File.open(pft_with_empty_trackers))
108
+ tks = i.to_a
109
+ assert_equal 3, tks.length
110
+ assert_equal 0, tks[0].length, "The tracker should have 0 keyframes for this test to make sense"
111
+
112
+ FileUtils.cp(pft_with_empty_trackers, "./input_empty.2dt")
113
+
114
+ pipeline = Tracksperanto::Pipeline::Base.new
115
+ num_t, num_k = pipeline.run("./input_empty.2dt", :width => 1920, :height => 1080)
116
+ assert_equal 1, num_t, "Only one tracker should have been sent through the export"
117
+ end
118
+
105
119
  def test_run_with_overridden_importer_and_size
106
120
  FileUtils.cp("./import/samples/3de_v4/3de_export_cube.txt", "./input.txt")
107
121
  pipeline = Tracksperanto::Pipeline::Base.new
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tracksperanto
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 2
9
- - 2
10
- version: 2.2.2
9
+ - 4
10
+ version: 2.2.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Julik Tarkhanov
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-02 00:00:00 +02:00
18
+ date: 2011-04-06 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -187,7 +187,9 @@ files:
187
187
  - test/import/samples/pfmatchit/pfmatchit_example.2dt
188
188
  - test/import/samples/pftrack4/sourcefile_pftrack.2dt
189
189
  - test/import/samples/pftrack5/apft.2dt
190
+ - test/import/samples/pftrack5/empty_trackers.2dt
190
191
  - test/import/samples/pftrack5/garage.2dt
192
+ - test/import/samples/shake_script/designated_global_range_starting_at_negative_frame.shk
191
193
  - test/import/samples/shake_script/four_tracks_in_one_matchmove.shk
192
194
  - test/import/samples/shake_script/four_tracks_in_one_stabilizer.shk
193
195
  - test/import/samples/shake_script/from_matchmover.shk