test/import/test_nuke_import.rb in tracksperanto-3.3.7 vs test/import/test_nuke_import.rb in tracksperanto-3.3.8
- old
+ new
@@ -4,12 +4,14 @@
class NukeImportTest < Test::Unit::TestCase
DELTA = 0.01
def test_introspects_properly
i = Tracksperanto::Import::NukeScript
- assert_equal "Nuke .nk script file with Tracker, Reconcile3D, PlanarTracker and CornerPin nodes", i.human_name
+ assert_equal "Nuke .nk script file with Tracker, Reconcile3D, Transform2D, PlanarTracker and CornerPin nodes",
+ i.human_name
assert !i.autodetects_size?
+ assert_not_nil i.known_snags
end
def test_parsing_big_file_from_nuke
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/45trackers.nk')
parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
@@ -70,9 +72,21 @@
trackers = parser.to_a
assert_equal 4, trackers.length
ref_names = %w( PlanarTracker1_outputBottomLeft PlanarTracker1_outputBottomRight
PlanarTracker1_outputTopLeft PlanarTracker1_outputTopRight )
+ assert_equal ref_names, trackers.map{|e| e.name }
+ end
+
+ def test_parsing_xform2d_nuke7
+ fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/nuke7_transform2d.nk')
+
+ parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
+ parser.width = 1920
+ parser.height = 1080
+
+ trackers = parser.to_a
+ ref_names = %w( Transform_for_AE_translate Transform_for_AE_center )
assert_equal ref_names, trackers.map{|e| e.name }
end
def test_parsing_from_nuke
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/one_tracker_with_break.nk')