lib/import/nuke_script.rb in tracksperanto-3.5.2 vs lib/import/nuke_script.rb in tracksperanto-3.5.4
- old
+ new
@@ -123,10 +123,13 @@
def initialize(options)
@name = options["name"]
@trackers = []
tracks = options["tracks"]
+
+ return unless tracks # For linked Tracker nodes that have no tracks
+
preamble = tracks[1]
headers = tracks[2]
values = tracks[3]
# When this was written, this was the order of the columns in the table:
@@ -140,15 +143,18 @@
tracker_rows[1..-1].each do | row |
row_content = row[0]
# For offsets see above
point_name = row_content[2]
- x_curve = Tickly::Curve.new(row_content[3])
- y_curve = Tickly::Curve.new(row_content[4])
-
- full_name = [options["name"], point_name].join('_')
- tracker = package_tracker(full_name, x_curve, y_curve)
- @trackers << tracker
+ begin
+ x_curve = Tickly::Curve.new(row_content[3])
+ y_curve = Tickly::Curve.new(row_content[4])
+ full_name = [options["name"], point_name].join('_')
+ tracker = package_tracker(full_name, x_curve, y_curve)
+ @trackers << tracker
+ rescue Tickly::Curve::InvalidCurveError
+ # $stderr.puts "Failed to recover a tracker, it probably contained expressions"
+ end
end
end
end
end