Created
October 10, 2009 11:00
-
-
Save julik/206786 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "tracksperanto" | |
# Make a tracker called "FirstPoint" | |
t = Tracksperanto::Tracker.new(:name => "FirstPoint") | |
# Add a keyframe to it at frame 20 (counting from 0), at 123 | |
# in X and 678 in Y (from lower left corner). | |
t.keyframe! :frame => 20, :abs_x => 123, :abs_y => 678 | |
# Open a file for writing, initialize an exporter with it and pass the Tracker | |
# objects to the exporter, along with the width and height | |
File.open("/tmp/pftrack.2dt", "wb") do | f | | |
x = Tracksperanto::Export::PFTrack5.new(f) | |
x.just_export([t], 720, 576) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment