lib/export/maya_live.rb in tracksperanto-1.4.0 vs lib/export/maya_live.rb in tracksperanto-1.5.0

- old
+ new

@@ -1,16 +1,21 @@ class Tracksperanto::Export::MayaLive < Tracksperanto::Export::Base + # Maya Live exports and imports tracks in "aspect units", so a point at 0,0 + # will be at -1.78,-1 in MayaLive coordinates with aspect of 1.78. Therefore + # we offer an override for the aspect being exported + attr_accessor :aspect + def self.desc_and_extension "mayalive.txt" end def self.human_name "MayaLive track export" end def start_export( img_width, img_height) - @aspect = img_width.to_f / img_height + @aspect ||= img_width.to_f / img_height @w, @h = img_width, img_height first_line = (%w( # Size) + [@w, @h, "%.2f" % @aspect]).join(" ") @io.puts(first_line) \ No newline at end of file