lib/tracksperanto/tracker.rb in tracksperanto-1.2.6 vs lib/tracksperanto/tracker.rb in tracksperanto-1.3.0

- old
+ new

@@ -25,9 +25,15 @@ # Trackers sort by the position of the first keyframe def <=>(other_tracker) self[0].frame <=> other_tracker[0].frame end + # Automatically truncate spaces in the tracker + # name and replace them with underscores + def name=(n) + @name = n.to_s.gsub(/(\s+)/, '_') + end + # Create and save a keyframe in this tracker def keyframe!(options) push(Tracksperanto::Keyframe.new(options)) end \ No newline at end of file