class Tracksperanto::Export::AE
Exports trackers as an AfterEffects script creating nulls
Constants
- PREAMBLE
Public Class Methods
desc_and_extension()
click to toggle source
# File lib/export/cosa.rb, line 19 def self.desc_and_extension "createNulls.jsx" end
human_name()
click to toggle source
# File lib/export/cosa.rb, line 23 def self.human_name "AfterEffects .jsx script generating null layers" end
Public Instance Methods
end_export()
click to toggle source
# File lib/export/cosa.rb, line 50 def end_export @io.puts('}') # Finishes the export clause end
end_tracker_segment()
click to toggle source
# File lib/export/cosa.rb, line 46 def end_tracker_segment @count += 1 end
export_point(frame, abs_float_x, abs_float_y, float_residual)
click to toggle source
# File lib/export/cosa.rb, line 42 def export_point(frame, abs_float_x, abs_float_y, float_residual) @io.puts('pos.setValueAtTime(convertFrameToSeconds(layer%d, %d), [%0.5f,%0.5f]);' % [@count, frame, abs_float_x, @height - abs_float_y]) end
start_export(w, h)
click to toggle source
# File lib/export/cosa.rb, line 27 def start_export(w, h) @io.puts(PREAMBLE) @io.puts("") @count = 0 @height = h end
start_tracker_segment(tracker_name)
click to toggle source
# File lib/export/cosa.rb, line 34 def start_tracker_segment(tracker_name) @io.puts("") @io.puts('var layer%d = activeComp.layers.addNull();' % @count) @io.puts( 'layer%d.name = %s;' % [@count, tracker_name.inspect]) @io.puts("") @io.puts('var pos = layer%d.property("Transform").property("Position");' % @count) end