bin/tracksperanto in tracksperanto-1.7.1 vs bin/tracksperanto in tracksperanto-1.7.2

- old
+ new

@@ -25,10 +25,11 @@ golden_tracks = false x_shift = 0 y_shift = 0 set_prefix = '' sole_format = nil +lerp = false reader_name = "ShakeScript" readers = Tracksperanto.importer_names writers = Tracksperanto.exporter_names parser = OptionParser.new do | p | @@ -58,10 +59,11 @@ p.on(" -o", "--only EXPORTER_NAME", String, "Only export the selected format, format must be one of #{writers.join(", ")}") {|f| sole_format = f } p.on(" -xm", "--xshift X_IN_PIXELS", Float, "Move the points left or right") {|sx| x_shift = sx } p.on(" -ym", "--yshift Y_IN_PIXELS", Float, "Move the points up or down") {|sx| y_shift = sx } + p.on("--lerp", "Linearly interpolate missing keyframes") {|v| lerp = true } p.on("--version", "Show the version and exit") {|v| puts "#{Tracksperanto::VERSION} running on Ruby #{RUBY_VERSION} on #{RUBY_PLATFORM}" puts "Copyright 2008-#{Time.now.year} by Guerilla-DI (Julik Tarkhanov and contributors)" puts "For questions and support contact info at guerilla-di.org" exit(0) @@ -116,17 +118,18 @@ STDERR.puts "Unknown exporter #{sole_format}. Available exporters: #{writers.join(", ")}" exit(-1) end end -pipe.run(input_file, :pix_w => width, :pix_h => height, :parser => reader_klass) do | scaler, slipper, golden, reformat, shift, prefix | +pipe.run(input_file, :pix_w => width, :pix_h => height, :parser => reader_klass) do | scaler, slipper, golden, reformat, shift, prefix, lerpm | slipper.slip = slip scaler.x_factor = scale_x scaler.y_factor = scale_y golden.enabled = golden_tracks reformat.width = reformat_w if reformat_w reformat.height = reformat_h if reformat_h shift.x_shift = x_shift shift.y_shift = y_shift prefix.prefix = set_prefix + lerpm.enabled = lerp end STDOUT.puts("\rConverted #{pipe.converted_points} trackers with #{pipe.converted_keyframes} keys") \ No newline at end of file