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.2.2 lib/tools/shift.rb
tracksperanto-3.2.1 lib/tools/shift.rb
tracksperanto-3.2.0 lib/tools/shift.rb
tracksperanto-3.1.0 lib/tools/shift.rb
tracksperanto-3.0.1 lib/tools/shift.rb
tracksperanto-3.0.0 lib/tools/shift.rb