test/import/test_nuke_import.rb in tracksperanto-3.5.2 vs test/import/test_nuke_import.rb in tracksperanto-3.5.4
- old
+ new
@@ -255,9 +255,31 @@
assert_equal 762, sec_tracker.keyframes[-1].frame
assert_in_delta 1147.972, sec_tracker.keyframes[-1].abs_x, DELTA
assert_in_delta 510.107, sec_tracker.keyframes[-1].abs_y, DELTA
end
+ def test_no_failure_with_one_tracker4_having_empty_tracks_knob
+ fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/tracker4_with_empty_tracks_knob.nk')
+ parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
+ parser.width = 2088
+ parser.height = 1231
+
+ trackers = parser.to_a
+ assert_equal 22, trackers.length
+ assert_equal 217, trackers[0].length
+ end
+
+ def test_no_failure_with_tracker4_having_expressions_in_tracks
+ # Tickly::Curve::InvalidCurveError
+ fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/skip_invalid_curve_expressions.nk')
+ parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
+ parser.width = 960
+ parser.height = 540
+
+ trackers = parser.to_a
+ assert_equal 5, trackers.length
+ end
+
def test_zip_channels
tuples_x = [[1, 125], [3, 234], [5, 456], [9,876]]
tuples_y = [[2, 437], [3, 123], [6, 432], [9, 430]]
result = Tracksperanto::Import::NukeScript.new(:io => StringIO.new).send(:zip_curve_tuples, tuples_x, tuples_y)
assert_equal [[3, 234, 123], [9, 876, 430]], result