test/import/test_nuke_import.rb in tracksperanto-3.2.0 vs test/import/test_nuke_import.rb in tracksperanto-3.2.1
- old
+ new
@@ -123,10 +123,25 @@
assert_in_delta 106.75, kf.abs_x, DELTA
assert_in_delta 77.01, kf.abs_y, DELTA
assert_equal 9, kf.frame
end
+
+ def test_parsing_from_nuke7v05_job_1872
+ fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/failing_nuke7_trackers_job_1872.nk')
+
+ parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
+ parser.width = 2048
+ parser.height = 1556
+
+ trackers = parser.to_a
+ assert_equal 2, trackers.length
+ assert_equal "Tracker5_track_1", trackers[0].name
+ assert_equal "Tracker5_track_2", trackers[1].name
+ assert_equal 16, trackers[1].length
+ end
+
def test_parsing_from_nuke_group
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/one_tracker_with_break_in_grp.nk')
parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
parser.width = 2048
@@ -141,10 +156,10 @@
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_parsing_nuke_curve
- curve = %w( curve x742 888 890.2463989 891.6602783
+ curve = [:c] + %w( curve x742 888 890.2463989 891.6602783
893.5056763 895.6155396 s95 897.2791748 899.1762695
x754 912.0731812 x755 913.7190552 916.0959473 918.1025391 920.0751953 922.1898804 )
p = Tracksperanto::NukeGrammarUtils.new
result = p.parse_curve(curve)
assert_kind_of Array, result