tracksperanto 3.5.2 → 3.5.4
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/import/nuke_script.rb +12 -6
- data/lib/tracksperanto.rb +1 -1
- data/lib/tracksperanto/blacklist.rb +3 -0
- data/test/import/test_nuke_import.rb +22 -0
- data/test/test_blacklist.rb +4 -0
- data/tracksperanto.gemspec +2 -2
- metadata +4 -4
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 3.5.4
|
2
|
+
|
3
|
+
* Fix parsing Nuke scripts with Tracker4 where some tracks were expression-only
|
4
|
+
* Fix parsing Nuke scripts with Tracker4 nodes having empty or no tracks at all
|
5
|
+
|
1
6
|
=== 3.5.0
|
2
7
|
|
3
8
|
* Add early bailout if unsupported formats are fed in. Because some people just can't read.
|
data/lib/import/nuke_script.rb
CHANGED
@@ -125,6 +125,9 @@ class Tracksperanto::Import::NukeScript < Tracksperanto::Import::Base
|
|
125
125
|
@name = options["name"]
|
126
126
|
@trackers = []
|
127
127
|
tracks = options["tracks"]
|
128
|
+
|
129
|
+
return unless tracks # For linked Tracker nodes that have no tracks
|
130
|
+
|
128
131
|
preamble = tracks[1]
|
129
132
|
headers = tracks[2]
|
130
133
|
values = tracks[3]
|
@@ -142,12 +145,15 @@ class Tracksperanto::Import::NukeScript < Tracksperanto::Import::Base
|
|
142
145
|
|
143
146
|
# For offsets see above
|
144
147
|
point_name = row_content[2]
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
148
|
+
begin
|
149
|
+
x_curve = Tickly::Curve.new(row_content[3])
|
150
|
+
y_curve = Tickly::Curve.new(row_content[4])
|
151
|
+
full_name = [options["name"], point_name].join('_')
|
152
|
+
tracker = package_tracker(full_name, x_curve, y_curve)
|
153
|
+
@trackers << tracker
|
154
|
+
rescue Tickly::Curve::InvalidCurveError
|
155
|
+
# $stderr.puts "Failed to recover a tracker, it probably contained expressions"
|
156
|
+
end
|
151
157
|
end
|
152
158
|
end
|
153
159
|
end
|
data/lib/tracksperanto.rb
CHANGED
@@ -21,6 +21,9 @@ class Tracksperanto::Blacklist
|
|
21
21
|
/\.(pfb|pfmp)/ => 'We cannot directly open PFTrack projects, export .2dt files instead',
|
22
22
|
'.mmf' => 'We cannot directly open MatchMover projects, please export your tracks as .rz2 instead',
|
23
23
|
/\.(doc(x?)|xls(x?)|ppt(x?))/ => 'You really think we can process Microsoft Office files? You need a drink.',
|
24
|
+
/\.(abc|fbx)$/ => 'We cannot import 3D scenes such as Alembic or FBX.',
|
25
|
+
'.3de' => 'We cannot handle 3DE project files directly, please export your 2D tracks in a compatible format instead.',
|
26
|
+
'.bpj' => "We cannot handle Boujou projects directly, please export your feature tracks from Boujou as a text file",
|
24
27
|
}
|
25
28
|
end
|
26
29
|
end
|
@@ -257,6 +257,28 @@ class NukeImportTest < Test::Unit::TestCase
|
|
257
257
|
assert_in_delta 510.107, sec_tracker.keyframes[-1].abs_y, DELTA
|
258
258
|
end
|
259
259
|
|
260
|
+
def test_no_failure_with_one_tracker4_having_empty_tracks_knob
|
261
|
+
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/tracker4_with_empty_tracks_knob.nk')
|
262
|
+
parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
|
263
|
+
parser.width = 2088
|
264
|
+
parser.height = 1231
|
265
|
+
|
266
|
+
trackers = parser.to_a
|
267
|
+
assert_equal 22, trackers.length
|
268
|
+
assert_equal 217, trackers[0].length
|
269
|
+
end
|
270
|
+
|
271
|
+
def test_no_failure_with_tracker4_having_expressions_in_tracks
|
272
|
+
# Tickly::Curve::InvalidCurveError
|
273
|
+
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/skip_invalid_curve_expressions.nk')
|
274
|
+
parser = Tracksperanto::Import::NukeScript.new(:io => fixture)
|
275
|
+
parser.width = 960
|
276
|
+
parser.height = 540
|
277
|
+
|
278
|
+
trackers = parser.to_a
|
279
|
+
assert_equal 5, trackers.length
|
280
|
+
end
|
281
|
+
|
260
282
|
def test_zip_channels
|
261
283
|
tuples_x = [[1, 125], [3, 234], [5, 456], [9,876]]
|
262
284
|
tuples_y = [[2, 437], [3, 123], [6, 432], [9, 430]]
|
data/test/test_blacklist.rb
CHANGED
@@ -33,6 +33,10 @@ class TestBlacklist < Test::Unit::TestCase
|
|
33
33
|
file.pptx
|
34
34
|
file.xls
|
35
35
|
file.xlsx
|
36
|
+
file.fbx
|
37
|
+
file.abc
|
38
|
+
file.3de
|
39
|
+
file.bpj
|
36
40
|
).each do | filename |
|
37
41
|
error = assert_raise(Tracksperanto::UnsupportedFormatError, "Should fail for #{filename.inspect}") do
|
38
42
|
Tracksperanto::Blacklist.raise_if_format_unsupported(filename)
|
data/tracksperanto.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{tracksperanto}
|
8
|
-
s.version = "3.5.
|
8
|
+
s.version = "3.5.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Julik Tarkhanov"]
|
12
|
-
s.date = %q{2014-
|
12
|
+
s.date = %q{2014-11-08}
|
13
13
|
s.default_executable = %q{tracksperanto}
|
14
14
|
s.description = %q{Converts 2D track exports between different apps like Flame, MatchMover, PFTrack...}
|
15
15
|
s.email = %q{me@julik.nl}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracksperanto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 3.5.
|
9
|
+
- 4
|
10
|
+
version: 3.5.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Julik Tarkhanov
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2014-
|
18
|
+
date: 2014-11-08 00:00:00 +01:00
|
19
19
|
default_executable: tracksperanto
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|