Sha256: 2dcb4861744de3ba4714bab649300324eadb07a0575e3ba06cfc822c8984087f

Contents?: true

Size: 609 Bytes

Versions: 26

Compression:

Stored size: 609 Bytes

Contents

# -*- encoding : utf-8 -*-
# This tool moves the keyframs by a preset number of pixels
class Tracksperanto::Tool::Shift < Tracksperanto::Tool::Base
  
  parameter :x_shift,  :cast => :float, :desc => "Amount of horizontal shift (in px)", :default => 0
  parameter :y_shift,  :cast => :float, :desc => "Amount of vertical shift (in px)", :default => 0
  
  def self.action_description
    "Move all the trackers by a specified number of pixels"
  end
  
  def export_point(frame, float_x, float_y, float_residual)
    super(frame, float_x + @x_shift.to_f, float_y + @y_shift.to_f, float_residual)
  end
  
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
tracksperanto-3.5.9 lib/tools/shift.rb
tracksperanto-3.5.8 lib/tools/shift.rb
tracksperanto-3.5.7 lib/tools/shift.rb
tracksperanto-3.5.6 lib/tools/shift.rb
tracksperanto-3.5.5 lib/tools/shift.rb
tracksperanto-3.5.4 lib/tools/shift.rb
tracksperanto-3.5.2 lib/tools/shift.rb
tracksperanto-3.5.1 lib/tools/shift.rb
tracksperanto-3.5.0 lib/tools/shift.rb
tracksperanto-3.4.1 lib/tools/shift.rb
tracksperanto-3.4.0 lib/tools/shift.rb
tracksperanto-3.3.13 lib/tools/shift.rb
tracksperanto-3.3.12 lib/tools/shift.rb
tracksperanto-3.3.11 lib/tools/shift.rb
tracksperanto-3.3.10 lib/tools/shift.rb
tracksperanto-3.3.9 lib/tools/shift.rb
tracksperanto-3.3.8 lib/tools/shift.rb
tracksperanto-3.3.7 lib/tools/shift.rb
tracksperanto-3.3.6 lib/tools/shift.rb
tracksperanto-3.3.0.pre lib/tools/shift.rb