bin/tracksperanto in tracksperanto-1.7.3 vs bin/tracksperanto in tracksperanto-1.7.4

- old
+ new

@@ -23,10 +23,11 @@ scale_y = 1.0 slip = 0 golden_tracks = false x_shift = 0 y_shift = 0 +length_gate = 0 set_prefix = '' sole_format = nil lerp = false reader_name = "ShakeScript" readers = Tracksperanto.importer_names @@ -49,18 +50,21 @@ p.on(" -s", "--slip FRAMES", Integer, "Slip the result by this number of frames, positive is 'later'") {|sy| slip = sy } p.on(" -g", "--golden", "Reset the residuals of all trackers to 0 (ignore correlation)") {|g_flag| golden_tracks = g_flag } p.on(" -rx", "--reformat-x NEW_PIX_WIDTH", Integer, "Reformat the comp to this width and scale all tracks to it") {|rw| - reformat_w = rw + reformat_w = rw } p.on(" -ry", "--reformat-y NEW_PIX_HEIGHT", Integer, "Reformat the comp to this height and scale all tracks to it") {|rh| - reformat_h = rh + reformat_h = rh } p.on(" -o", "--only EXPORTER_NAME", String, "Only export the selected format, format must be one of #{writers.join(", ")}") {|f| - sole_format = f + sole_format = f } + p.on(" -m", "--min-length LENGTH_IN_FRAMES", Integer, "Only export trackers having more than X keyframes") {|f| + length_gate = 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}" @@ -118,18 +122,19 @@ 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, lerpm | +pipe.run(input_file, :pix_w => width, :pix_h => height, :parser => reader_klass) do | scaler, slipper, golden, reformat, shift, prefix, lerpm, len | 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 + len.min_length = length_gate end STDOUT.puts("\rConverted #{pipe.converted_points} trackers with #{pipe.converted_keyframes} keys") \ No newline at end of file