lib/export/flame_stabilizer.rb in tracksperanto-2.2.4 vs lib/export/flame_stabilizer.rb in tracksperanto-2.3.0

- old
+ new

@@ -42,10 +42,13 @@ t.fixed_x false t.fixed_y false t.tolerance 100 end end + + # Write the finalizing "End" + @writer.write_loose!("end") end def start_tracker_segment(tracker_name) @counter += 1 @write_first_frame = true @@ -64,10 +67,15 @@ def end_tracker_segment # We write these at tracker end since we need to know in advance # how many keyframes they should contain write_shift_channel("shift/x", @x_shift_values) write_shift_channel("shift/y", @y_shift_values) + + # And finish with the offset channels. The order of channels is important! + # (otherwise the last tracker's shift animation is not imported by Flame) + # https://github.com/guerilla-di/tracksperanto/issues/1 + write_offset_channels end private def export_remaining_point(flame_frame, abs_float_x, abs_float_y) @@ -138,10 +146,9 @@ write_track_channels write_track_width_and_height write_ref_width_and_height write_ref_channels(x, y) write_deltax_and_deltay_channels - write_offset_channels end def write_track_channels ctr_x, ctr_y = @width / 2, @height / 2