tracksperanto 1.6.6 → 1.6.7
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/MIT_LICENSE.txt +20 -0
- data/Manifest.txt +3 -0
- data/README.txt +4 -0
- data/Rakefile +2 -2
- data/lib/export/base.rb +7 -4
- data/lib/export/nuke_script.rb +13 -3
- data/lib/import/boujou.rb +1 -1
- data/lib/import/shake_grammar/catcher.rb +2 -1
- data/lib/import/shake_grammar/lexer.rb +15 -5
- data/lib/import/shake_script.rb +11 -18
- data/lib/pipeline/base.rb +9 -10
- data/lib/tracksperanto.rb +1 -1
- data/test/export/.DS_Store +0 -0
- data/test/export/samples/ref_NukeScript.nk +2 -2
- data/test/export/test_nuke_export.rb +2 -2
- data/test/import/samples/nuke/tracker_with_differing_gaps.nk +82 -0
- data/test/import/test_nuke_import.rb +16 -0
- metadata +7 -3
data/History.txt
CHANGED
data/MIT_LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2004-2010 Julik Tarkhanov
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Manifest.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
History.txt
|
2
|
+
MIT_LICENSE.txt
|
2
3
|
Manifest.txt
|
3
4
|
README.txt
|
4
5
|
Rakefile
|
@@ -48,6 +49,7 @@ lib/tracksperanto/simple_export.rb
|
|
48
49
|
lib/tracksperanto/tracker.rb
|
49
50
|
lib/tracksperanto/uv_coordinates.rb
|
50
51
|
lib/tracksperanto/zip_tuples.rb
|
52
|
+
test/export/.DS_Store
|
51
53
|
test/export/README_EXPORT_TESTS.txt
|
52
54
|
test/export/samples/ref_Mayalive.txt
|
53
55
|
test/export/samples/ref_Mayalive_CustomAspect.txt
|
@@ -83,6 +85,7 @@ test/import/samples/mayalive/mayalive_kipShot.txt
|
|
83
85
|
test/import/samples/nuke/018.nk
|
84
86
|
test/import/samples/nuke/one_tracker_with_break.nk
|
85
87
|
test/import/samples/nuke/one_tracker_with_break_in_grp.nk
|
88
|
+
test/import/samples/nuke/tracker_with_differing_gaps.nk
|
86
89
|
test/import/samples/pftrack4/sourcefile_pftrack.2dt
|
87
90
|
test/import/samples/pftrack5/garage.2dt
|
88
91
|
test/import/samples/shake_script/four_tracks_in_one_matchmove.shk
|
data/README.txt
CHANGED
@@ -41,6 +41,10 @@ footage you are tracking came cropped or in a wrong aspect - the only way to sol
|
|
41
41
|
will be to retrack it from scratch. Tracksperanto allows you to work around this
|
42
42
|
by applying simple transformations to the tracks.
|
43
43
|
|
44
|
+
== Licensing
|
45
|
+
|
46
|
+
Tracksperanto is made avalable under the MIT license that is included in the package.
|
47
|
+
|
44
48
|
== Usage
|
45
49
|
|
46
50
|
The main way to use Tracksperanto is with the the supplied "tracksperanto" binary, like so:
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ begin
|
|
9
9
|
|
10
10
|
Hoe.spec('tracksperanto') do | p |
|
11
11
|
p.version = Tracksperanto::VERSION
|
12
|
-
p.
|
12
|
+
p.extra_dev_deps = {"flexmock" => ">=0"}
|
13
13
|
p.rubyforge_name = 'guerilla-di'
|
14
14
|
p.developer('Julik Tarkhanov', 'me@julik.nl')
|
15
15
|
p.extra_rdoc_files = p.extra_rdoc_files.reject{|e| e =~ "samples\/"}
|
@@ -19,7 +19,7 @@ rescue LoadError
|
|
19
19
|
task :default => [ :test ]
|
20
20
|
|
21
21
|
require 'rake/testtask'
|
22
|
-
desc "Run all tests
|
22
|
+
desc "Run all tests"
|
23
23
|
Rake::TestTask.new("test") do |t|
|
24
24
|
t.libs << "test"
|
25
25
|
t.pattern = 'test/**/test_*.rb'
|
data/lib/export/base.rb
CHANGED
@@ -25,7 +25,7 @@ class Tracksperanto::Export::Base
|
|
25
25
|
end
|
26
26
|
|
27
27
|
# The constructor for an exporter should accept a handle to the IO object that you can write to.
|
28
|
-
# This gets assigned to @io ivar by default, but you can do whatever
|
28
|
+
# This gets assigned to @io ivar by default, but you can do whatever you wish
|
29
29
|
# By convention, the caller will close the IO when you are done so don't do it here
|
30
30
|
def initialize(write_to_io)
|
31
31
|
@io = write_to_io
|
@@ -35,7 +35,9 @@ class Tracksperanto::Export::Base
|
|
35
35
|
def start_export( img_width, img_height)
|
36
36
|
end
|
37
37
|
|
38
|
-
# Called on export end. By convention, the caller will close the IO when you are done so don't do it here
|
38
|
+
# Called on export end. By convention, the caller will close the IO when you are done so don't do it here.
|
39
|
+
# However if you've allocated anything during export (like some Tempfiles) here will be the place to get rid
|
40
|
+
# of them
|
39
41
|
def end_export
|
40
42
|
end
|
41
43
|
|
@@ -43,11 +45,12 @@ class Tracksperanto::Export::Base
|
|
43
45
|
def start_tracker_segment(tracker_name)
|
44
46
|
end
|
45
47
|
|
46
|
-
# Called on tracker end
|
48
|
+
# Called on tracker end, once for each tracker
|
47
49
|
def end_tracker_segment
|
48
50
|
end
|
49
51
|
|
50
|
-
# Called for each tracker keyframe, with the Tracksperanto internal coordinates and frame numbers
|
52
|
+
# Called for each tracker keyframe, with the Tracksperanto internal coordinates and frame numbers.
|
53
|
+
# The calls come after start_tracker_segment and before end_tracker_segment
|
51
54
|
def export_point(at_frame_i, abs_float_x, abs_float_y, float_residual)
|
52
55
|
end
|
53
56
|
end
|
data/lib/export/nuke_script.rb
CHANGED
@@ -57,16 +57,26 @@ Constant {
|
|
57
57
|
@tracker << [frame + 1, abs_float_x, abs_float_y]
|
58
58
|
end
|
59
59
|
|
60
|
-
private
|
60
|
+
private
|
61
|
+
|
61
62
|
# Generates a couple of Nuke curves (x and y) from the passed tuples of [frame, x, y]
|
62
63
|
def curves_from_tuples(tuples)
|
63
|
-
x_values, y_values, last_frame_exported = [], [], nil
|
64
|
+
x_values, y_values, last_frame_exported, repeat_jump = [], [], nil, false
|
64
65
|
tuples.each do | t |
|
65
66
|
f = t.shift
|
66
|
-
|
67
|
+
|
68
|
+
if last_frame_exported != (f - 1) # new section
|
69
|
+
x_values << "x#{f}"
|
70
|
+
y_values << "x#{f}"
|
71
|
+
repeat_jump = true
|
72
|
+
elsif repeat_jump
|
73
|
+
# If we are AFTER a gap inject another "jump" signal
|
74
|
+
# so that Nuke does not animate with gaps but with frames
|
67
75
|
x_values << "x#{f}"
|
68
76
|
y_values << "x#{f}"
|
77
|
+
repeat_jump = false
|
69
78
|
end
|
79
|
+
|
70
80
|
t.map!{|e| KEYFRAME_PRECISION_TEMPLATE % e }
|
71
81
|
x_values << t.shift
|
72
82
|
y_values << t.shift
|
data/lib/import/boujou.rb
CHANGED
@@ -38,7 +38,7 @@ class Tracksperanto::Import::Boujou < Tracksperanto::Import::Base
|
|
38
38
|
#
|
39
39
|
# # track_id view x y
|
40
40
|
# Target_track_1 5 252.046 171.677
|
41
|
-
def filtering_trackers_from(io)
|
41
|
+
def filtering_trackers_from(io) #:yields: track_id, frame, x, y
|
42
42
|
until io.eof?
|
43
43
|
line = io.gets_and_strip
|
44
44
|
next if comment?(line)
|
@@ -3,11 +3,21 @@ module Tracksperanto::ShakeGrammar
|
|
3
3
|
# but concise C-like lexer to cope
|
4
4
|
class Lexer
|
5
5
|
|
6
|
+
# Parsed stack
|
6
7
|
attr_reader :stack
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
# Access to the sentinel object
|
10
|
+
attr_reader :sentinel
|
11
|
+
|
12
|
+
STOP_TOKEN = :__stop #:nodoc:
|
13
|
+
|
14
|
+
# The first argument is the IO handle to the data of the Shake script.
|
15
|
+
# The second argument is a "sentinel" that is going to be passed
|
16
|
+
# to the downstream lexers instantiated for nested data structures.
|
17
|
+
# You can use the sentinel to collect data from child nodes for example.
|
18
|
+
def initialize(with_io, sentinel = nil)
|
19
|
+
@io, @stack, @buf, @sentinel = with_io, [], '', sentinel
|
20
|
+
catch(STOP_TOKEN) { parse until @io.eof? }
|
11
21
|
in_comment? ? consume_comment("\n") : consume_atom!
|
12
22
|
end
|
13
23
|
|
@@ -31,7 +41,7 @@ module Tracksperanto::ShakeGrammar
|
|
31
41
|
return consume_comment(c) if in_comment?
|
32
42
|
|
33
43
|
if !@buf.empty? && (c == "(") # Funcall
|
34
|
-
push([:funcall, @buf.strip] + self.class.new(@io).stack)
|
44
|
+
push([:funcall, @buf.strip] + self.class.new(@io, @sentinel).stack)
|
35
45
|
@buf = ''
|
36
46
|
elsif c == "[" # Array, booring
|
37
47
|
push([:arr] + self.class.new(@io).stack)
|
@@ -39,7 +49,7 @@ module Tracksperanto::ShakeGrammar
|
|
39
49
|
# Funcall end, and when it happens assume we are called as
|
40
50
|
# a subexpression.
|
41
51
|
consume_atom!
|
42
|
-
|
52
|
+
throw STOP_TOKEN
|
43
53
|
elsif (c == ",")
|
44
54
|
consume_atom!
|
45
55
|
elsif (c == ";" || c == "\n")
|
data/lib/import/shake_script.rb
CHANGED
@@ -11,16 +11,11 @@ class Tracksperanto::Import::ShakeScript < Tracksperanto::Import::Base
|
|
11
11
|
".shk"
|
12
12
|
end
|
13
13
|
|
14
|
+
# Extractor. The injection should be an array of two elements: the array collecting
|
15
|
+
# trackers and the progress proc
|
14
16
|
class Traxtractor < Tracksperanto::ShakeGrammar::Catcher
|
15
17
|
include Tracksperanto::ZipTuples
|
16
18
|
|
17
|
-
class << self
|
18
|
-
attr_accessor :accumulator
|
19
|
-
attr_accessor :progress_block
|
20
|
-
end
|
21
|
-
|
22
|
-
self.accumulator = []
|
23
|
-
|
24
19
|
# For Linear() curve calls. If someone selected JSpline or Hermite it's his problem.
|
25
20
|
# We put the frame number at the beginning since it works witih oru tuple zipper
|
26
21
|
def linear(first_arg, *keyframes)
|
@@ -180,7 +175,7 @@ class Tracksperanto::Import::ShakeScript < Tracksperanto::Import::Base
|
|
180
175
|
private
|
181
176
|
|
182
177
|
def report_progress(with_message)
|
183
|
-
|
178
|
+
sentinel[1].call(with_message) if sentinel[1]
|
184
179
|
end
|
185
180
|
|
186
181
|
def collect_trackers_from(name, array)
|
@@ -201,8 +196,7 @@ class Tracksperanto::Import::ShakeScript < Tracksperanto::Import::Base
|
|
201
196
|
Tracksperanto::Keyframe.new(:frame => frame - 1, :abs_x => x, :abs_y => y)
|
202
197
|
end
|
203
198
|
|
204
|
-
|
205
|
-
self.class.accumulator.push(t)
|
199
|
+
push_tracker(:name => name, :keyframes => keyframes)
|
206
200
|
end
|
207
201
|
|
208
202
|
def collect_tracker(name, x_curve, y_curve, corr_curve, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12)
|
@@ -218,9 +212,7 @@ class Tracksperanto::Import::ShakeScript < Tracksperanto::Import::Base
|
|
218
212
|
keyframes = zip_curve_tuples(*curve_set).map do | (frame, x, y, corr) |
|
219
213
|
Tracksperanto::Keyframe.new(:frame => frame - 1, :abs_x => x, :abs_y => y, :residual => (1 - corr.to_f))
|
220
214
|
end
|
221
|
-
|
222
|
-
t = Tracksperanto::Tracker.new(:name => name, :keyframes => keyframes )
|
223
|
-
self.class.accumulator.push(t)
|
215
|
+
push_tracker(:name => name, :keyframes => keyframes)
|
224
216
|
end
|
225
217
|
|
226
218
|
def combine_curves(x, y, corr_curve)
|
@@ -228,15 +220,16 @@ class Tracksperanto::Import::ShakeScript < Tracksperanto::Import::Base
|
|
228
220
|
curve_set << corr_curve if (corr_curve.respond_to?(:length) && corr_curve.length >= x.length)
|
229
221
|
curve_set
|
230
222
|
end
|
223
|
+
|
224
|
+
def push_tracker(tracker_options)
|
225
|
+
sentinel[0].push(Tracksperanto::Tracker.new(tracker_options))
|
226
|
+
end
|
231
227
|
end
|
232
228
|
|
233
229
|
def parse(script_io)
|
234
230
|
trackers = []
|
235
|
-
|
236
|
-
Traxtractor.
|
237
|
-
Traxtractor.progress_block = lambda{|msg| report_progress(msg) }
|
238
|
-
Traxtractor.new(script_io)
|
239
|
-
|
231
|
+
progress_proc = lambda{|msg| report_progress(msg) }
|
232
|
+
Traxtractor.new(script_io, [trackers, progress_proc])
|
240
233
|
trackers
|
241
234
|
end
|
242
235
|
|
data/lib/pipeline/base.rb
CHANGED
@@ -4,14 +4,13 @@
|
|
4
4
|
# pipe = Tracksperanto::Pipeline::Base.new
|
5
5
|
# pipe.progress_block = lambda{|percent, msg| puts("#{msg}..#{percent.to_i}%") }
|
6
6
|
#
|
7
|
-
# pipe.run(
|
8
|
-
#
|
9
|
-
# reformat.width = 1024
|
10
|
-
# reformat.width = 576
|
7
|
+
# pipe.run("/tmp/shakescript.shk", :pix_w => 720, :pix_h => 576) do | *all_middlewares |
|
8
|
+
# # configure middlewares here
|
11
9
|
# end
|
12
10
|
#
|
13
|
-
# The pipeline will also automatically allocate output files with the right extensions
|
14
|
-
#
|
11
|
+
# The pipeline will also automatically allocate output files with the right extensions
|
12
|
+
# at the same place where the original file resides,
|
13
|
+
# and setup outputs for all supported export formats.
|
15
14
|
class Tracksperanto::Pipeline::Base
|
16
15
|
|
17
16
|
# How many points have been converted. In general, the pipeline does not preserve the parsed tracker objects
|
@@ -35,10 +34,10 @@ class Tracksperanto::Pipeline::Base
|
|
35
34
|
# Runs the whole pipeline. Accepts the following options
|
36
35
|
# * pix_w - The comp width, for the case that the format does not support auto size
|
37
36
|
# * pix_h - The comp height, for the case that the format does not support auto size
|
38
|
-
# * parser - The parser class, for the case that
|
39
|
-
|
40
|
-
|
41
|
-
pix_w, pix_h, parser_class = detect_importer_or_use_options(from_input_file_path,
|
37
|
+
# * parser - The parser class, for the case that it can't be autodetected from the file name
|
38
|
+
def run(from_input_file_path, passed_options = {}) #:yields: *all_middlewares
|
39
|
+
o = DEFAULT_OPTIONS.merge(passed_options)
|
40
|
+
pix_w, pix_h, parser_class = detect_importer_or_use_options(from_input_file_path, o)
|
42
41
|
|
43
42
|
# Reset stats
|
44
43
|
@converted_keyframes, @converted_points = 0, 0
|
data/lib/tracksperanto.rb
CHANGED
Binary file
|
@@ -11,14 +11,14 @@ Constant {
|
|
11
11
|
}
|
12
12
|
|
13
13
|
Tracker3 {
|
14
|
-
track1 {{curve i x1 0.0000 96.0000 192.0000 288.0000 384.0000 480.0000 576.0000 672.0000 768.0000 864.0000 960.0000 1056.0000 1152.0000 1248.0000 1344.0000 1440.0000 1536.0000 1632.0000 1728.0000 1824.0000 1920.0000} {curve i x1 1080.0000 874.8000 691.2000 529.2000 388.8000 270.0000 172.8000 97.2000 43.2000 10.8000 0.0000 10.8000 43.2000 97.2000 172.8000 270.0000 388.8000 529.2000 691.2000 874.8000 1080.0000}}
|
14
|
+
track1 {{curve i x1 0.0000 x2 96.0000 192.0000 288.0000 384.0000 480.0000 576.0000 672.0000 768.0000 864.0000 960.0000 1056.0000 1152.0000 1248.0000 1344.0000 1440.0000 1536.0000 1632.0000 1728.0000 1824.0000 1920.0000} {curve i x1 1080.0000 x2 874.8000 691.2000 529.2000 388.8000 270.0000 172.8000 97.2000 43.2000 10.8000 0.0000 10.8000 43.2000 97.2000 172.8000 270.0000 388.8000 529.2000 691.2000 874.8000 1080.0000}}
|
15
15
|
name Parabolic_1_from_top_left
|
16
16
|
xpos 0
|
17
17
|
ypos 30
|
18
18
|
}
|
19
19
|
|
20
20
|
Tracker3 {
|
21
|
-
track1 {{curve i x1 1920.0000 1824.0000 1728.0000 1632.0000 1536.0000 1440.0000 1344.0000 1248.0000 1152.0000 1056.0000 960.0000 864.0000 768.0000 672.0000 576.0000 480.0000 384.0000 288.0000 192.0000 96.0000 0.0000} {curve i x1 0.0000 205.2000 388.8000 550.8000 691.2000 810.0000 907.2000 982.8000 1036.8000 1069.2000 1080.0000 1069.2000 1036.8000 982.8000 907.2000 810.0000 691.2000 550.8000 388.8000 205.2000 0.0000}}
|
21
|
+
track1 {{curve i x1 1920.0000 x2 1824.0000 1728.0000 1632.0000 1536.0000 1440.0000 1344.0000 1248.0000 1152.0000 1056.0000 960.0000 864.0000 768.0000 672.0000 576.0000 480.0000 384.0000 288.0000 192.0000 96.0000 0.0000} {curve i x1 0.0000 x2 205.2000 388.8000 550.8000 691.2000 810.0000 907.2000 982.8000 1036.8000 1069.2000 1080.0000 1069.2000 1036.8000 982.8000 907.2000 810.0000 691.2000 550.8000 388.8000 205.2000 0.0000}}
|
22
22
|
name Parabolic_2_from_bottom_right
|
23
23
|
xpos 0
|
24
24
|
ypos 60
|
@@ -14,9 +14,9 @@ class NukeExportTest < Test::Unit::TestCase
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def test_tuples_to_curves
|
17
|
-
tuples = [[6, 234, 145], [8, 144, 223], [9, 231, 189]]
|
17
|
+
tuples = [[6, 234, 145], [8, 144, 223], [9, 231, 189], [10, 232, 190]]
|
18
18
|
x = Tracksperanto::Export::NukeScript.new(StringIO.new)
|
19
19
|
curves = x.send(:curves_from_tuples, tuples)
|
20
|
-
assert_equal "{curve i x6 234.0000 x8 144.0000 231.0000} {curve i x6 145.0000 x8 223.0000 189.0000}", curves
|
20
|
+
assert_equal "{curve i x6 234.0000 x8 144.0000 x9 231.0000 232.0000} {curve i x6 145.0000 x8 223.0000 x9 189.0000 190.0000}", curves
|
21
21
|
end
|
22
22
|
end
|
@@ -0,0 +1,82 @@
|
|
1
|
+
#! /Applications/Nuke5.2v3/Nuke5.2v3.app/Contents/MacOS/Nuke5.2v3 -nx
|
2
|
+
version 5.2300
|
3
|
+
define_window_layout_xml {<?xml version="1.0" encoding="UTF-8"?>
|
4
|
+
<layout version="1.0">
|
5
|
+
<window x="163" y="22" w="1680" h="1024" screen="0">
|
6
|
+
<splitter orientation="1">
|
7
|
+
<split size="1062"></split>
|
8
|
+
<splitter orientation="1">
|
9
|
+
<split size="40"></split>
|
10
|
+
<dock id="" hideTitles="1" activePageId="Toolbar.1">
|
11
|
+
<page id="Toolbar.1"></page>
|
12
|
+
</dock>
|
13
|
+
<split size="1018"></split>
|
14
|
+
<splitter orientation="2">
|
15
|
+
<split size="499"></split>
|
16
|
+
<dock id="" activePageId="Viewer.1">
|
17
|
+
<page id="Viewer.1"></page>
|
18
|
+
</dock>
|
19
|
+
<split size="499"></split>
|
20
|
+
<dock id="" activePageId="DAG.1">
|
21
|
+
<page id="DAG.1"></page>
|
22
|
+
<page id="Curve Editor.1"></page>
|
23
|
+
</dock>
|
24
|
+
</splitter>
|
25
|
+
</splitter>
|
26
|
+
<split size="614"></split>
|
27
|
+
<dock id="" activePageId="Properties.1">
|
28
|
+
<page id="Properties.1"></page>
|
29
|
+
<page id="Script Editor.1"></page>
|
30
|
+
</dock>
|
31
|
+
</splitter>
|
32
|
+
</window>
|
33
|
+
</layout>
|
34
|
+
}
|
35
|
+
Root {
|
36
|
+
inputs 0
|
37
|
+
name /Code/apps/tracksperanto/test/import/samples/nuke/tracker_with_differing_gaps.nk
|
38
|
+
frame 110
|
39
|
+
last_frame 340
|
40
|
+
lock_range true
|
41
|
+
format "2048 1556 0 0 2048 1556 1 2K_Super_35(full-ap)"
|
42
|
+
proxy_type scale
|
43
|
+
proxy_format "1024 778 0 0 1024 778 1 1K_Super_35(full-ap)"
|
44
|
+
}
|
45
|
+
Read {
|
46
|
+
inputs 0
|
47
|
+
file /Users/julik/Desktop/VFX_Projectery/Target/s31/imp/s31_toLin_DIST.%04d.jpg
|
48
|
+
format "2048 3112 0 0 2048 3112 1 "
|
49
|
+
last 340
|
50
|
+
name Read1
|
51
|
+
xpos -315
|
52
|
+
ypos -176
|
53
|
+
}
|
54
|
+
Tracker3 {
|
55
|
+
track1 {{curve x22 682 677.8408813 676.0637207 671.6843262 667.552002 666.1954956 661.3134155 658.52771 656.0322266 651.600769 649.4697266 646.7433472 642.364563 641.3949585 637.7145996 634.6853027 633.1293335 629.868103 626.6664429 625.713501 621.2104492 619.5162964 617.4292603 613.7619629 611.5888062 x61 555 x62 548.7984009 545.6205444 539.6292114 532.8546753 529.2728271 522.1868896 516.2642822 511.1176453 503.9720764 497.4740295 492.9031982 484.4396362 x100 318 x103 304 x105 291.7999878 x106 286.2000122 278.7999878 x109 269.2000122 x110 263.2000122} {curve x22 1156 1154.666138 1155.331299 1156.672974 1153.877563 1155.259521 1154.65918 1152.168335 1152.477051 1152.115234 1149.824341 1150.614502 1147.347046 1146.821167 1144.796631 1140.738037 1139.098267 1137.47876 1133.239502 1132.942261 1130.466919 1126.970337 1125.021606 1122.027222 1118.608521 x61 1085 x62 1081.507446 1079.341919 1078.684082 1073.892944 1073.416748 1071.084717 1066.524414 1066.126099 1063.667603 1058.772217 1059.141846 1054.595581 x100 960 x103 967.7999878 x105 970 x106 971.7999878 971.7999878 x109 979.2000122 x110 975.7999878}}
|
56
|
+
offset1 {0 0}
|
57
|
+
pattern1 {-14 -13 14 13}
|
58
|
+
search1 {-12 -10 12 10}
|
59
|
+
track2 {1126 1454}
|
60
|
+
offset2 {0 0}
|
61
|
+
pattern2 {-32 -32 32 32}
|
62
|
+
search2 {-22 -22 22 22}
|
63
|
+
track3 {1126 1658}
|
64
|
+
offset3 {0 0}
|
65
|
+
pattern3 {-32 -32 32 32}
|
66
|
+
search3 {-22 -22 22 22}
|
67
|
+
track4 {922 1658}
|
68
|
+
offset4 {0 0}
|
69
|
+
pattern4 {-32 -32 32 32}
|
70
|
+
search4 {-22 -22 22 22}
|
71
|
+
translate {{curve x22 0 -4.159118652 -5.936279297 -10.31567383 -14.44799805 -15.80450439 -20.68658447 -23.47229004 -25.96777344 -30.39923096 -32.53027344 -35.25665283 -39.63543701 -40.6050415 -44.28540039 -47.31469727 -48.8706665 -52.13189697 -55.33355713 -56.28649902 -60.78955078 -62.48370361 -64.57073975 -68.23803711 -70.41119385 x61 -127 x62 -133.2015991 -136.3794556 -142.3707886 -149.1453247 -152.7271729 -159.8131104 -165.7357178 -170.8823547 -178.0279236 -184.5259705 -189.0968018 -197.5603638 x100 -364 x103 -378 x105 -390.2000122 x106 -395.7999878 -403.2000122 x109 -412.7999878 x110 -418.7999878} {curve x22 0 -1.333862305 -0.6687011719 0.6729736328 -2.122436523 -0.7404785156 -1.340820312 -3.831665039 -3.522949219 -3.884765625 -6.17565918 -5.385498047 -8.652954102 -9.178833008 -11.20336914 -15.26196289 -16.9017334 -18.52124023 -22.76049805 -23.05773926 -25.53308105 -29.02966309 -30.97839355 -33.97277832 -37.39147949 x61 -71 x62 -74.49255371 -76.65808105 -77.31591797 -82.10705566 -82.58325195 -84.9152832 -89.47558594 -89.87390137 -92.33239746 -97.2277832 -96.8581543 -101.4044189 x100 -196 x103 -188.2000122 x105 -186 x106 -184.2000122 -184.2000122 x109 -176.7999878 x110 -180.2000122}}
|
72
|
+
center {{curve x22 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 682 x61 682 x62 682 682 682 682 682 682 682 682 682 682 682 682 x100 682 x103 682 x105 682 x106 682 682 x109 682 x110 682} {curve x22 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 x61 1156 x62 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 1156 x100 1156 x103 1156 x105 1156 x106 1156 1156 x109 1156 x110 1156}}
|
73
|
+
name Tracker1
|
74
|
+
xpos -255
|
75
|
+
ypos -82
|
76
|
+
}
|
77
|
+
Viewer {
|
78
|
+
frame 110
|
79
|
+
name Viewer1
|
80
|
+
xpos -41
|
81
|
+
ypos -9
|
82
|
+
}
|
@@ -35,6 +35,22 @@ class NukeImportTest < Test::Unit::TestCase
|
|
35
35
|
assert_equal 21, trackers.length
|
36
36
|
end
|
37
37
|
|
38
|
+
def test_parsing_node_with_gaps
|
39
|
+
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/tracker_with_differing_gaps.nk')
|
40
|
+
parser = Tracksperanto::Import::NukeScript.new
|
41
|
+
parser.width = 2048
|
42
|
+
parser.height = 3112
|
43
|
+
trackers = parser.parse(fixture)
|
44
|
+
assert_equal 1, trackers.length
|
45
|
+
t = trackers[0]
|
46
|
+
assert_equal 45, t.length
|
47
|
+
assert_equal 21, t[0].frame
|
48
|
+
assert_equal 45, t[24].frame
|
49
|
+
assert_equal 60, t[25].frame
|
50
|
+
assert_equal 61, t[26].frame
|
51
|
+
assert_equal 109, t[-1].frame
|
52
|
+
end
|
53
|
+
|
38
54
|
def test_parsing_from_nuke_group
|
39
55
|
fixture = File.open(File.dirname(__FILE__) + '/samples/nuke/one_tracker_with_break_in_grp.nk')
|
40
56
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracksperanto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -9,12 +9,12 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-13 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: flexmock
|
17
|
-
type: :
|
17
|
+
type: :development
|
18
18
|
version_requirement:
|
19
19
|
version_requirements: !ruby/object:Gem::Requirement
|
20
20
|
requirements:
|
@@ -41,10 +41,12 @@ extensions: []
|
|
41
41
|
|
42
42
|
extra_rdoc_files:
|
43
43
|
- History.txt
|
44
|
+
- MIT_LICENSE.txt
|
44
45
|
- Manifest.txt
|
45
46
|
- README.txt
|
46
47
|
files:
|
47
48
|
- History.txt
|
49
|
+
- MIT_LICENSE.txt
|
48
50
|
- Manifest.txt
|
49
51
|
- README.txt
|
50
52
|
- Rakefile
|
@@ -94,6 +96,7 @@ files:
|
|
94
96
|
- lib/tracksperanto/tracker.rb
|
95
97
|
- lib/tracksperanto/uv_coordinates.rb
|
96
98
|
- lib/tracksperanto/zip_tuples.rb
|
99
|
+
- test/export/.DS_Store
|
97
100
|
- test/export/README_EXPORT_TESTS.txt
|
98
101
|
- test/export/samples/ref_Mayalive.txt
|
99
102
|
- test/export/samples/ref_Mayalive_CustomAspect.txt
|
@@ -129,6 +132,7 @@ files:
|
|
129
132
|
- test/import/samples/nuke/018.nk
|
130
133
|
- test/import/samples/nuke/one_tracker_with_break.nk
|
131
134
|
- test/import/samples/nuke/one_tracker_with_break_in_grp.nk
|
135
|
+
- test/import/samples/nuke/tracker_with_differing_gaps.nk
|
132
136
|
- test/import/samples/pftrack4/sourcefile_pftrack.2dt
|
133
137
|
- test/import/samples/pftrack5/garage.2dt
|
134
138
|
- test/import/samples/shake_script/four_tracks_in_one_matchmove.shk
|