lib/import/nuke_script.rb in tracksperanto-3.3.6 vs lib/import/nuke_script.rb in tracksperanto-3.3.7

- old
+ new

@@ -3,27 +3,30 @@ require 'tickly' class Tracksperanto::Import::NukeScript < Tracksperanto::Import::Base def self.human_name - "Nuke .nk script file with Tracker, Reconcile3D and PlanarTracker nodes" + "Nuke .nk script file with Tracker, Reconcile3D, PlanarTracker and CornerPin nodes" end def self.distinct_file_ext ".nk" end def self.known_snags - 'The only supported nodes that we can extract tracks from are Reconcile3D, PlanarTracker and Tracker (supported Nuke versions are 5, 6 and 7)' + 'The only supported nodes that we can extract tracks from are Reconcile3D,' + + ' PlanarTracker and Tracker (supported Nuke versions are 5, 6 and 7)' end def each parser = Tickly::NodeProcessor.new parser.add_node_handler_class(Tracker3) parser.add_node_handler_class(Reconcile3D) parser.add_node_handler_class(PlanarTracker1_0) + parser.add_node_handler_class(PlanarTracker) parser.add_node_handler_class(Tracker4) + parser.add_node_handler_class(CornerPin2D) parser.parse(@io) do | node | node.trackers.each do | t | report_progress("Scavenging tracker #{t.name}") yield t @@ -85,12 +88,26 @@ def point_channels %w( output) end end + # Planar tracker in Nuke 6 class PlanarTracker1_0 < Tracker3 def point_channels %w( outputBottomLeft outputBottomRight outputTopLeft outputTopRight) + end + end + + # Planar tracker in Nuke 7 + class PlanarTracker < PlanarTracker1_0 + def point_channels + %w( outputBottomLeft outputBottomRight outputTopLeft outputTopRight) + end + end + + class CornerPin2D < Tracker3 + def point_channels + %w( to1 to2 to3 to4 ) end end class Tracker4 < Tracker3