tracksperanto 2.11.2 → 2.11.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/export/cosa.rb +17 -7
- data/lib/export/syntheyes.rb +4 -2
- data/lib/import/nuke_script.rb +4 -0
- data/lib/tracksperanto.rb +1 -1
- data/test/export/samples/ref_AfterEffects.jsx +16 -9
- data/test/helper.rb +11 -2
- data/test/test_pipeline.rb +9 -0
- data/tracksperanto.gemspec +2 -2
- metadata +3 -3
data/History.txt
CHANGED
data/lib/export/cosa.rb
CHANGED
@@ -4,12 +4,18 @@ class Tracksperanto::Export::AE < Tracksperanto::Export::Base
|
|
4
4
|
|
5
5
|
PREAMBLE = '// Run this script from the Script Editor
|
6
6
|
function convertFrameToSeconds(layerWithFootage, frameValue)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
{
|
8
|
+
var comp = layerWithFootage.containingComp;
|
9
|
+
var rate = 1.0 / comp.frameDuration;
|
10
|
+
// Frames in AE are 0-based by default
|
11
|
+
return (frameValue) / rate;
|
12
|
+
}
|
13
|
+
|
14
|
+
var activeComp = app.project.activeItem;
|
15
|
+
if(!activeComp) {
|
16
|
+
// Totally fail
|
17
|
+
alert("You need to be focused on a comp for the tracker creation to work");
|
18
|
+
} else {'
|
13
19
|
|
14
20
|
def self.desc_and_extension
|
15
21
|
"createNulls.jsx"
|
@@ -28,7 +34,7 @@ function convertFrameToSeconds(layerWithFootage, frameValue)
|
|
28
34
|
|
29
35
|
def start_tracker_segment(tracker_name)
|
30
36
|
@io.puts("")
|
31
|
-
@io.puts('var layer%d =
|
37
|
+
@io.puts('var layer%d = activeComp.layers.addNull();' % @count)
|
32
38
|
@io.puts( 'layer%d.name = %s;' % [@count, tracker_name.inspect])
|
33
39
|
@io.puts("")
|
34
40
|
@io.puts('var pos = layer%d.property("Transform").property("Position");' % @count)
|
@@ -42,4 +48,8 @@ function convertFrameToSeconds(layerWithFootage, frameValue)
|
|
42
48
|
@count += 1
|
43
49
|
end
|
44
50
|
|
51
|
+
def end_export
|
52
|
+
@io.puts('}') # Finishes the export clause
|
53
|
+
end
|
54
|
+
|
45
55
|
end
|
data/lib/export/syntheyes.rb
CHANGED
@@ -25,11 +25,13 @@ class Tracksperanto::Export::SynthEyes < Tracksperanto::Export::Base
|
|
25
25
|
convert_to_uv(abs_float_y, @height) * -1,
|
26
26
|
get_outcome_code(frame)
|
27
27
|
]
|
28
|
-
@io.puts(
|
28
|
+
@io.puts(LINE_TEMPLATE % values)
|
29
29
|
end
|
30
30
|
|
31
31
|
private
|
32
|
-
|
32
|
+
|
33
|
+
LINE_TEMPLATE = "%s %d %.6f %.6f %d"
|
34
|
+
|
33
35
|
STATUS_STD = 7 # For a standard frame (not a keyframe)
|
34
36
|
STATUS_REENABLE = 15 # When the tracker goes back into view
|
35
37
|
|
data/lib/import/nuke_script.rb
CHANGED
@@ -12,6 +12,10 @@ class Tracksperanto::Import::NukeScript < Tracksperanto::Import::Base
|
|
12
12
|
".nk"
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.known_snags
|
16
|
+
'The only supported nodes that we can extract tracks from are Reconcile3D, PlanarTracker and Tracker'
|
17
|
+
end
|
18
|
+
|
15
19
|
def each
|
16
20
|
io = Tracksperanto::ExtIO.new(@io)
|
17
21
|
while line = io.gets_and_strip
|
data/lib/tracksperanto.rb
CHANGED
@@ -1,14 +1,20 @@
|
|
1
1
|
// Run this script from the Script Editor
|
2
2
|
function convertFrameToSeconds(layerWithFootage, frameValue)
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
3
|
+
{
|
4
|
+
var comp = layerWithFootage.containingComp;
|
5
|
+
var rate = 1.0 / comp.frameDuration;
|
6
|
+
// Frames in AE are 0-based by default
|
7
|
+
return (frameValue) / rate;
|
8
|
+
}
|
9
9
|
|
10
|
+
var activeComp = app.project.activeItem;
|
11
|
+
if(!activeComp) {
|
12
|
+
// Totally fail
|
13
|
+
alert("You need to be focused on a comp for the tracker creation to work");
|
14
|
+
} else {
|
10
15
|
|
11
|
-
|
16
|
+
|
17
|
+
var layer0 = activeComp.layers.addNull();
|
12
18
|
layer0.name = "Parabolic_1_from_top_left";
|
13
19
|
|
14
20
|
var pos = layer0.property("Transform").property("Position");
|
@@ -32,7 +38,7 @@ pos.setValueAtTime(convertFrameToSeconds(layer0, 18), [1728.00000,388.80000]);
|
|
32
38
|
pos.setValueAtTime(convertFrameToSeconds(layer0, 19), [1824.00000,205.20000]);
|
33
39
|
pos.setValueAtTime(convertFrameToSeconds(layer0, 20), [1920.00000,0.00000]);
|
34
40
|
|
35
|
-
var layer1 =
|
41
|
+
var layer1 = activeComp.layers.addNull();
|
36
42
|
layer1.name = "Parabolic_2_from_bottom_right";
|
37
43
|
|
38
44
|
var pos = layer1.property("Transform").property("Position");
|
@@ -56,8 +62,9 @@ pos.setValueAtTime(convertFrameToSeconds(layer1, 18), [192.00000,691.20000]);
|
|
56
62
|
pos.setValueAtTime(convertFrameToSeconds(layer1, 19), [96.00000,874.80000]);
|
57
63
|
pos.setValueAtTime(convertFrameToSeconds(layer1, 20), [0.00000,1080.00000]);
|
58
64
|
|
59
|
-
var layer2 =
|
65
|
+
var layer2 = activeComp.layers.addNull();
|
60
66
|
layer2.name = "SingleFrame_InTheMiddle";
|
61
67
|
|
62
68
|
var pos = layer2.property("Transform").property("Position");
|
63
69
|
pos.setValueAtTime(convertFrameToSeconds(layer2, 0), [970.00000,530.00000]);
|
70
|
+
}
|
data/test/helper.rb
CHANGED
@@ -98,8 +98,17 @@ module ParabolicTracks
|
|
98
98
|
[ref_buffer, actual_buffer].each{|io| io.rewind }
|
99
99
|
|
100
100
|
# There are subtle differences in how IO is handled on dfferent platforms (Darwin)
|
101
|
-
|
102
|
-
|
101
|
+
lineno = 0
|
102
|
+
begin
|
103
|
+
loop do
|
104
|
+
return if ref_buffer.eof? && actual_buffer.eof?
|
105
|
+
lineno += 1
|
106
|
+
ref_line, actual_line = ref_buffer.readline, actual_buffer.readline
|
107
|
+
assert_equal ref_line, actual_line, "Mismatch on line #{lineno}:"
|
108
|
+
end
|
109
|
+
rescue EOFError
|
110
|
+
flunk "One of the buffers was too short at #{lineno}"
|
111
|
+
end
|
103
112
|
end
|
104
113
|
|
105
114
|
def ensure_same_output(exporter_klass, reference_path, message = "The line should be identical")
|
data/test/test_pipeline.rb
CHANGED
@@ -44,6 +44,15 @@ class TestPipeline < Test::Unit::TestCase
|
|
44
44
|
assert_equal 9, pipeline.converted_keyframes, "Should report conversion of 9 keyframes"
|
45
45
|
end
|
46
46
|
|
47
|
+
def test_run_with_error_picks_up_known_snags_from_importer
|
48
|
+
create_stabilizer_file
|
49
|
+
pipeline = Tracksperanto::Pipeline::Base.new
|
50
|
+
flexmock(Tracksperanto::Import::ShakeScript).should_receive(:known_snags).times(1)
|
51
|
+
assert_raise(Tracksperanto::Pipeline::NoTrackersRecoveredError) do
|
52
|
+
pipeline.run(@stabilizer, :importer => "ShakeScript", :width => 2910, :height => 1080)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
47
56
|
def test_run_with_autodetected_importer_and_size_with_progress_block
|
48
57
|
create_stabilizer_file
|
49
58
|
processing_log = ""
|
data/tracksperanto.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "tracksperanto"
|
8
|
-
s.version = "2.11.
|
8
|
+
s.version = "2.11.3"
|
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 = "2012-
|
12
|
+
s.date = "2012-09-12"
|
13
13
|
s.description = "Converts 2D track exports between different apps like Flame, MatchMover, PFTrack..."
|
14
14
|
s.email = "me@julik.nl"
|
15
15
|
s.executables = ["tracksperanto"]
|
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: 2.11.
|
4
|
+
version: 2.11.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: obuf
|
@@ -363,7 +363,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
363
363
|
version: '0'
|
364
364
|
segments:
|
365
365
|
- 0
|
366
|
-
hash: -
|
366
|
+
hash: -3129268817076589173
|
367
367
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
368
368
|
none: false
|
369
369
|
requirements:
|