Sha256: d408c44943d55bc442f9a6cf1b8a4891227d07477769380ddad69ba92e92b60a
Contents?: true
Size: 864 Bytes
Versions: 5
Compression:
Stored size: 864 Bytes
Contents
# Exports the trackers to a script that is fit for massaging with Tracksperanto as is class Tracksperanto::Export::Ruby < Tracksperanto::Export::Base def self.desc_and_extension "tracksperanto_ruby.rb" end def self.human_name "Bare Ruby code" end def start_export(w,h) @io.puts "require 'rubygems'" @io.puts "require 'tracksperanto'" @io.puts("width = %d" % w) @io.puts("height = %d" % h) @io.puts("trackers = []") end def start_tracker_segment(name) @io.puts(" ") @io.write("trackers << ") @tracker = Tracksperanto::Tracker.new(:name => name) end def export_point(f, x, y, r) @tracker.keyframe! :frame => f, :abs_x => x, :abs_y => y, :residual => r end def end_tracker_segment @io.puts(@tracker.to_ruby)# Just leave that end def end_export @io.puts(" ") end end
Version data entries
5 entries across 5 versions & 1 rubygems