lib/import/flame_stabilizer.rb in tracksperanto-1.8.4 vs lib/import/flame_stabilizer.rb in tracksperanto-1.9.0
- old
+ new
@@ -12,13 +12,10 @@
def self.human_name
"Flame .stabilizer file"
end
- T = ::Tracksperanto::Tracker
- K = ::Tracksperanto::Keyframe
-
class ChannelBlock < Array
include ::Tracksperanto::Casts
cast_to_string :name
cast_to_float :base_value
@@ -173,11 +170,11 @@
trackers
end
def grab_tracker(channels, track_x)
- t = T.new(:name => track_x.name.split('/').shift)
+ t = Tracksperanto::Tracker.new(:name => track_x.name.split('/').shift)
report_progress("Extracting tracker #{t.name}")
track_y = channels.find{|e| e.name == "#{t.name}/#{REF_CHANNEL}/y" }
shift_x = channels.find{|e| e.name == "#{t.name}/shift/x" }
@@ -198,10 +195,10 @@
# Flame keyframes are sort of minus-one based, so to start at frame 0
# we need to decrement one frame, always. Also, the shift value is inverted!
kf_x, kf_y = base_x - x.to_f, base_y - y.to_f
report_progress("Extracting keyframe #{total_kf += 1} of #{t.name}")
- K.new(:frame => (at - 1), :abs_x => kf_x, :abs_y => kf_y)
+ Tracksperanto::Keyframe.new(:frame => (at - 1), :abs_x => kf_x, :abs_y => kf_y)
end
return t
end
\ No newline at end of file