tracksperanto 1.6.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +4 -0
- data/Manifest.txt +0 -6
- data/lib/export/base.rb +3 -3
- data/lib/export/equalizer3.rb +2 -3
- data/lib/export/equalizer4.rb +1 -5
- data/lib/export/match_mover.rb +2 -2
- data/lib/tracksperanto.rb +4 -5
- data/test/export/test_equalizer3_export.rb +9 -0
- data/test/export/test_match_mover_export.rb +9 -0
- metadata +2 -8
- data/test/export/.DS_Store +0 -0
- data/test/import/.DS_Store +0 -0
- data/test/import/samples/flame_stabilizer/.DS_Store +0 -0
- data/test/import/samples/pftrack5/.DS_Store +0 -0
- data/test/import/samples/shake_script/.DS_Store +0 -0
- data/test/import/samples/syntheyes_2d_paths/.DS_Store +0 -0
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -49,7 +49,6 @@ lib/tracksperanto/simple_export.rb
|
|
49
49
|
lib/tracksperanto/tracker.rb
|
50
50
|
lib/tracksperanto/uv_coordinates.rb
|
51
51
|
lib/tracksperanto/zip_tuples.rb
|
52
|
-
test/export/.DS_Store
|
53
52
|
test/export/README_EXPORT_TESTS.txt
|
54
53
|
test/export/samples/ref_Mayalive.txt
|
55
54
|
test/export/samples/ref_Mayalive_CustomAspect.txt
|
@@ -72,11 +71,9 @@ test/export/test_pftrack_export.rb
|
|
72
71
|
test/export/test_shake_export.rb
|
73
72
|
test/export/test_syntheyes_export.rb
|
74
73
|
test/helper.rb
|
75
|
-
test/import/.DS_Store
|
76
74
|
test/import/samples/3de_v3/3de_export_v3.txt
|
77
75
|
test/import/samples/3de_v4/3de_export_cube.txt
|
78
76
|
test/import/samples/boujou_features_text/boujou_txt_export.txt
|
79
|
-
test/import/samples/flame_stabilizer/.DS_Store
|
80
77
|
test/import/samples/flame_stabilizer/fromCombustion_fromMidClip_wSnap.stabilizer
|
81
78
|
test/import/samples/flame_stabilizer/hugeFlameSetup.stabilizer
|
82
79
|
test/import/samples/flame_stabilizer/megaTrack.action.3dtrack.stabilizer
|
@@ -88,9 +85,7 @@ test/import/samples/nuke/one_tracker_with_break_in_grp.nk
|
|
88
85
|
test/import/samples/nuke/tracker_with_differing_gaps.nk
|
89
86
|
test/import/samples/nuke/tracker_with_repeating_gaps.nk
|
90
87
|
test/import/samples/pftrack4/sourcefile_pftrack.2dt
|
91
|
-
test/import/samples/pftrack5/.DS_Store
|
92
88
|
test/import/samples/pftrack5/garage.2dt
|
93
|
-
test/import/samples/shake_script/.DS_Store
|
94
89
|
test/import/samples/shake_script/four_tracks_in_one_matchmove.shk
|
95
90
|
test/import/samples/shake_script/four_tracks_in_one_stabilizer.shk
|
96
91
|
test/import/samples/shake_script/shake_script_from_boujou.shk
|
@@ -103,7 +98,6 @@ test/import/samples/shake_script/two_tracks_in_one_tracker.shk
|
|
103
98
|
test/import/samples/shake_text/one_shake_tracker.txt
|
104
99
|
test/import/samples/shake_text/one_shake_tracker_from_first.txt
|
105
100
|
test/import/samples/shake_text/two_shake_trackers.txt
|
106
|
-
test/import/samples/syntheyes_2d_paths/.DS_Store
|
107
101
|
test/import/samples/syntheyes_2d_paths/cola_plate.txt
|
108
102
|
test/import/samples/syntheyes_2d_paths/flyover2DP_syntheyes.txt
|
109
103
|
test/import/samples/syntheyes_2d_paths/shake_tracker_nodes_to_syntheyes.txt
|
data/lib/export/base.rb
CHANGED
@@ -26,16 +26,16 @@ class Tracksperanto::Export::Base
|
|
26
26
|
|
27
27
|
# The constructor for an exporter should accept a handle to the IO object that you can write to.
|
28
28
|
# This gets assigned to @io ivar by default, but you can do whatever you wish
|
29
|
-
# By convention, the caller will close
|
29
|
+
# By convention, the caller owns the IO handle and will close it when you are done, so don't close t yourself
|
30
30
|
def initialize(write_to_io)
|
31
31
|
@io = write_to_io
|
32
32
|
end
|
33
33
|
|
34
|
-
# Called on export start. Will receive the width and height of the comp being exported
|
34
|
+
# Called on export start. Will receive the width and height of the comp being exported as Fixnums
|
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 main IO when you are done so don't do it here.
|
39
39
|
# However if you've allocated anything during export (like some Tempfiles) here will be the place to get rid
|
40
40
|
# of them
|
41
41
|
def end_export
|
data/lib/export/equalizer3.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Export for 3DE v3 point files
|
2
2
|
class Tracksperanto::Export::Equalizer3 < Tracksperanto::Export::Base
|
3
3
|
|
4
|
-
HEADER = '// 3DE Multiple Tracking Curves Export
|
4
|
+
HEADER = '// 3DE Multiple Tracking Curves Export %d x %d * %d frames'
|
5
5
|
|
6
6
|
def self.desc_and_extension
|
7
7
|
"3de_v3.txt"
|
@@ -30,8 +30,7 @@ class Tracksperanto::Export::Equalizer3 < Tracksperanto::Export::Base
|
|
30
30
|
|
31
31
|
def end_export
|
32
32
|
@buffer.rewind
|
33
|
-
|
34
|
-
@io.puts(preamble)
|
33
|
+
@io.puts(HEADER % [@w, @h, @highest_keyframe])
|
35
34
|
@io.puts(@buffer.read) until @buffer.eof?
|
36
35
|
@buffer.close!
|
37
36
|
@io.puts("") # Newline at end
|
data/lib/export/equalizer4.rb
CHANGED
@@ -38,11 +38,7 @@ class Tracksperanto::Export::Equalizer4 < Tracksperanto::Export::Base
|
|
38
38
|
@internal_io.rewind
|
39
39
|
@io.puts(@num_of_trackers)
|
40
40
|
@io.puts(@internal_io.read)
|
41
|
-
|
41
|
+
@internal_io.close!
|
42
42
|
end
|
43
43
|
|
44
|
-
private
|
45
|
-
def discard_io
|
46
|
-
@internal_io.close!
|
47
|
-
end
|
48
44
|
end
|
data/lib/export/match_mover.rb
CHANGED
@@ -9,7 +9,7 @@ class Tracksperanto::Export::MatchMover < Tracksperanto::Export::Base
|
|
9
9
|
"Matchmover 2D export .rz2 file"
|
10
10
|
end
|
11
11
|
|
12
|
-
PREAMBLE = %[imageSequence "Sequence 01"\n{\n\
|
12
|
+
PREAMBLE = %[imageSequence "Sequence 01"\n{\n\t%d\t%d\tf( "D:/temp/sequence.%%04d.dpx" )\tb( 1 211 1 )\t\n}\n]
|
13
13
|
TRACKER_PREAMBLE = "pointTrack %s rgb( 255 0 0 ) \n{\n"
|
14
14
|
TRACKER_POSTAMBLE = "}\n"
|
15
15
|
FIRST_KEYFRAME_TEMPLATE = "\t%d\t %.3f %.3f ki( 0.8 )\t s( 66 66 64 64 ) p( 24 24 25 25 )"
|
@@ -17,7 +17,7 @@ class Tracksperanto::Export::MatchMover < Tracksperanto::Export::Base
|
|
17
17
|
|
18
18
|
def start_export( img_width, img_height)
|
19
19
|
@height = img_height
|
20
|
-
@io.puts(PREAMBLE
|
20
|
+
@io.puts(PREAMBLE % [img_width, img_height])
|
21
21
|
end
|
22
22
|
|
23
23
|
def start_tracker_segment(tracker_name)
|
data/lib/tracksperanto.rb
CHANGED
@@ -4,7 +4,7 @@ require 'tempfile'
|
|
4
4
|
|
5
5
|
module Tracksperanto
|
6
6
|
PATH = File.expand_path(File.dirname(__FILE__))
|
7
|
-
VERSION = '1.
|
7
|
+
VERSION = '1.7.0'
|
8
8
|
|
9
9
|
module Import; end
|
10
10
|
module Export; end
|
@@ -14,10 +14,10 @@ module Tracksperanto
|
|
14
14
|
class << self
|
15
15
|
# Returns the array of all exporter classes defined
|
16
16
|
attr_accessor :exporters
|
17
|
-
|
17
|
+
|
18
18
|
# Returns the array of all importer classes defined
|
19
19
|
attr_accessor :importers
|
20
|
-
|
20
|
+
|
21
21
|
# Returns the array of all available middlewares
|
22
22
|
attr_accessor :middlewares
|
23
23
|
|
@@ -35,14 +35,13 @@ module Tracksperanto
|
|
35
35
|
def middleware_names
|
36
36
|
middlewares.map{|e| e.const_name }
|
37
37
|
end
|
38
|
-
|
39
38
|
end
|
40
39
|
|
41
40
|
self.exporters, self.importers, self.middlewares = [], [], []
|
42
41
|
|
43
42
|
end
|
44
43
|
|
45
|
-
%w(
|
44
|
+
%w(
|
46
45
|
const_name
|
47
46
|
casts
|
48
47
|
block_init
|
@@ -12,4 +12,13 @@ class Equalizer3ExportTestTest < Test::Unit::TestCase
|
|
12
12
|
assert_equal "3de_v3.txt", Tracksperanto::Export::Equalizer3.desc_and_extension
|
13
13
|
assert_equal "3DE v3 point export .txt file", Tracksperanto::Export::Equalizer3.human_name
|
14
14
|
end
|
15
|
+
|
16
|
+
def test_export_for_format_does_not_override_preamble
|
17
|
+
out = StringIO.new
|
18
|
+
expt = Tracksperanto::Export::Equalizer3.new(out)
|
19
|
+
expt.start_export(2048, 275)
|
20
|
+
expt.end_export
|
21
|
+
assert_equal "// 3DE Multiple Tracking Curves Export 2048 x 275 * 0 frames\n\n", out.string,
|
22
|
+
"Frame count should not bleed into width"
|
23
|
+
end
|
15
24
|
end
|
@@ -13,4 +13,13 @@ class MatchmoverExportTest < Test::Unit::TestCase
|
|
13
13
|
assert_equal "Matchmover 2D export .rz2 file", Tracksperanto::Export::MatchMover.human_name
|
14
14
|
end
|
15
15
|
|
16
|
+
def test_width_and_height_not_stepping_on_each_other_in_preamble
|
17
|
+
o = StringIO.new
|
18
|
+
expt = Tracksperanto::Export::MatchMover.new(o)
|
19
|
+
expt.start_export(1080, 720)
|
20
|
+
expt.end_export
|
21
|
+
assert_equal "imageSequence\t\"Sequence 01\"\n{\n\t1080\t720\tf( \"D:/temp/sequence.%04d.dpx\" )\tb( 1 211 1 )\t\n}\n",
|
22
|
+
o.string,
|
23
|
+
"The output width and height should be properly substituted"
|
24
|
+
end
|
16
25
|
end
|
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.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-01-
|
12
|
+
date: 2010-01-24 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -96,7 +96,6 @@ files:
|
|
96
96
|
- lib/tracksperanto/tracker.rb
|
97
97
|
- lib/tracksperanto/uv_coordinates.rb
|
98
98
|
- lib/tracksperanto/zip_tuples.rb
|
99
|
-
- test/export/.DS_Store
|
100
99
|
- test/export/README_EXPORT_TESTS.txt
|
101
100
|
- test/export/samples/ref_Mayalive.txt
|
102
101
|
- test/export/samples/ref_Mayalive_CustomAspect.txt
|
@@ -119,11 +118,9 @@ files:
|
|
119
118
|
- test/export/test_shake_export.rb
|
120
119
|
- test/export/test_syntheyes_export.rb
|
121
120
|
- test/helper.rb
|
122
|
-
- test/import/.DS_Store
|
123
121
|
- test/import/samples/3de_v3/3de_export_v3.txt
|
124
122
|
- test/import/samples/3de_v4/3de_export_cube.txt
|
125
123
|
- test/import/samples/boujou_features_text/boujou_txt_export.txt
|
126
|
-
- test/import/samples/flame_stabilizer/.DS_Store
|
127
124
|
- test/import/samples/flame_stabilizer/fromCombustion_fromMidClip_wSnap.stabilizer
|
128
125
|
- test/import/samples/flame_stabilizer/hugeFlameSetup.stabilizer
|
129
126
|
- test/import/samples/flame_stabilizer/megaTrack.action.3dtrack.stabilizer
|
@@ -135,9 +132,7 @@ files:
|
|
135
132
|
- test/import/samples/nuke/tracker_with_differing_gaps.nk
|
136
133
|
- test/import/samples/nuke/tracker_with_repeating_gaps.nk
|
137
134
|
- test/import/samples/pftrack4/sourcefile_pftrack.2dt
|
138
|
-
- test/import/samples/pftrack5/.DS_Store
|
139
135
|
- test/import/samples/pftrack5/garage.2dt
|
140
|
-
- test/import/samples/shake_script/.DS_Store
|
141
136
|
- test/import/samples/shake_script/four_tracks_in_one_matchmove.shk
|
142
137
|
- test/import/samples/shake_script/four_tracks_in_one_stabilizer.shk
|
143
138
|
- test/import/samples/shake_script/shake_script_from_boujou.shk
|
@@ -150,7 +145,6 @@ files:
|
|
150
145
|
- test/import/samples/shake_text/one_shake_tracker.txt
|
151
146
|
- test/import/samples/shake_text/one_shake_tracker_from_first.txt
|
152
147
|
- test/import/samples/shake_text/two_shake_trackers.txt
|
153
|
-
- test/import/samples/syntheyes_2d_paths/.DS_Store
|
154
148
|
- test/import/samples/syntheyes_2d_paths/cola_plate.txt
|
155
149
|
- test/import/samples/syntheyes_2d_paths/flyover2DP_syntheyes.txt
|
156
150
|
- test/import/samples/syntheyes_2d_paths/shake_tracker_nodes_to_syntheyes.txt
|
data/test/export/.DS_Store
DELETED
Binary file
|
data/test/import/.DS_Store
DELETED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|