tracksperanto 2.8.4 → 2.8.5
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 +73 -69
- data/README.rdoc +1 -1
- data/bin/tracksperanto +11 -0
- data/lib/middleware/crop.rb +16 -0
- data/lib/middleware/pad.rb +20 -0
- data/lib/tracksperanto.rb +1 -1
- data/test/middleware/test_crop_middleware.rb +27 -0
- data/test/middleware/test_pad_middleware.rb +30 -0
- data/tracksperanto.gemspec +6 -2
- metadata +24 -20
data/History.txt
CHANGED
|
@@ -1,52 +1,56 @@
|
|
|
1
|
-
=== 2.8.
|
|
1
|
+
=== 2.8.5
|
|
2
|
+
|
|
3
|
+
* Add Pad and Crop middlewares for fixing botched telecine and anamorphic Alexa
|
|
4
|
+
|
|
5
|
+
=== 2.8.2
|
|
2
6
|
|
|
3
7
|
* Fix release gemspec
|
|
4
8
|
|
|
5
|
-
=== 2.8.2
|
|
9
|
+
=== 2.8.2
|
|
6
10
|
|
|
7
11
|
* Dramatically improve the update speed by not shipping the test cases with the gem anymore
|
|
8
12
|
* Fix obuf for ruby 1.8x
|
|
9
13
|
|
|
10
|
-
=== 2.8.1
|
|
14
|
+
=== 2.8.1
|
|
11
15
|
|
|
12
16
|
* Fix the bug that MatchMover importer would always assume the sequence starting on frame 1
|
|
13
17
|
* Fix the bug that Lint middleware would raise when the export was started from negative frame offsets
|
|
14
18
|
|
|
15
|
-
=== 2.8.0
|
|
19
|
+
=== 2.8.0
|
|
16
20
|
|
|
17
21
|
* Add a special exporter for Flame cornerpins. Apparently the bilinear staiblizer wants the trackers to have the right names
|
|
18
22
|
right from the start (top_left, top_right and so on)
|
|
19
23
|
* Check trackers sent through to ensure that they always come sequentially without violating the frame ordering
|
|
20
24
|
|
|
21
|
-
=== 2.7.0
|
|
25
|
+
=== 2.7.0
|
|
22
26
|
|
|
23
27
|
* Speedup Shake script parsing by using a buffering reader
|
|
24
28
|
|
|
25
|
-
=== 2.6.4
|
|
29
|
+
=== 2.6.4
|
|
26
30
|
|
|
27
31
|
* Use various external dependencies that we extracted
|
|
28
32
|
* Note that Nuke now supports import and export of camera tracker features!
|
|
29
33
|
|
|
30
|
-
=== 2.6.3
|
|
34
|
+
=== 2.6.3
|
|
31
35
|
|
|
32
36
|
* Report progress from the parser for Flame, like it has been before
|
|
33
37
|
|
|
34
|
-
=== 2.6.2
|
|
38
|
+
=== 2.6.2
|
|
35
39
|
|
|
36
40
|
* Fix missing progress percentages in the Flame import module
|
|
37
41
|
|
|
38
|
-
=== 2.6.1
|
|
42
|
+
=== 2.6.1
|
|
39
43
|
|
|
40
44
|
* Fix errors that occurred when empty disabled trackers were present in Flame setups
|
|
41
45
|
* Give better error reports when an unknown constant gets requested (like a wrong importer)
|
|
42
46
|
* Use the flame_channel_parser gem now that it's stable.
|
|
43
47
|
|
|
44
|
-
=== 2.6.0
|
|
48
|
+
=== 2.6.0
|
|
45
49
|
|
|
46
50
|
* Adds the --trim option to remove keyframes that come in negative frames (before frame 0).
|
|
47
51
|
Some apps improperly handle such frames (Syntheyes)
|
|
48
52
|
|
|
49
|
-
=== 2.5.0
|
|
53
|
+
=== 2.5.0
|
|
50
54
|
|
|
51
55
|
* No status display in the progress bar. It was an annoyance.
|
|
52
56
|
* There are still crashes with flexmocks in tests, relevant flexmock issues filed upstream
|
|
@@ -54,266 +58,266 @@
|
|
|
54
58
|
* Use update_hints gem for version checks
|
|
55
59
|
* PFTrack 2011 and PFMAtchit actually use the same format, so we don't need to have 2 modules for them
|
|
56
60
|
|
|
57
|
-
=== 2.4.0
|
|
61
|
+
=== 2.4.0
|
|
58
62
|
|
|
59
63
|
* Added an official PFTrack 2011 exporter that is verified
|
|
60
64
|
|
|
61
|
-
=== 2.3.3
|
|
65
|
+
=== 2.3.3
|
|
62
66
|
|
|
63
67
|
* Fixed parsing of stereoscopic PFTrack exports
|
|
64
68
|
|
|
65
|
-
=== 2.3.2
|
|
69
|
+
=== 2.3.2
|
|
66
70
|
|
|
67
71
|
* Fixed handling of inline comments which are tacked onto the line in in Shake scripts
|
|
68
72
|
|
|
69
|
-
=== 2.3.1
|
|
73
|
+
=== 2.3.1
|
|
70
74
|
|
|
71
75
|
* Fixed support for curly braces in Shake scripts
|
|
72
76
|
* Added checks to prevent exports with empty trackers or exports which contain no data at all
|
|
73
77
|
|
|
74
|
-
=== 2.3.0
|
|
78
|
+
=== 2.3.0
|
|
75
79
|
|
|
76
80
|
* Fixed issue#1 (Last tracker in some Flame exports receives an empty shift channel)
|
|
77
81
|
* Nicer progress reports
|
|
78
82
|
* Modified the Accumulator to support nested iterations and random access
|
|
79
83
|
|
|
80
|
-
=== 2.2.4
|
|
84
|
+
=== 2.2.4
|
|
81
85
|
|
|
82
86
|
* Properly deal with negative frames happening in Shake scripts sometimes. We will now recognize a script starting at negative
|
|
83
87
|
frames and "bump" it's frames in curves so that everything neatly starts at frame 0. Granted this does not give us the same frame range
|
|
84
88
|
but most apps wil go bonkers anyway if we send them negative frame numbers.
|
|
85
89
|
|
|
86
|
-
=== 2.2.3
|
|
90
|
+
=== 2.2.3
|
|
87
91
|
|
|
88
92
|
* Prevent zero-length trackers (trackers having no position information) from being accumulated during import.
|
|
89
93
|
This had adverse effects on export modules that could not export trackers containing no information. As a sidenote we
|
|
90
94
|
will write down in the doco that an export module should not expect empty trackers with no keyframes to be sent
|
|
91
95
|
|
|
92
|
-
=== 2.2.2
|
|
96
|
+
=== 2.2.2
|
|
93
97
|
|
|
94
98
|
* The last change to PFMatchit exporter had adverse effects on pftrack files, now fixed.
|
|
95
99
|
* Pipeline now has it's own exceptions, all inheriting from RuntimeError
|
|
96
100
|
|
|
97
|
-
=== 2.2.1
|
|
101
|
+
=== 2.2.1
|
|
98
102
|
|
|
99
103
|
* April fool!
|
|
100
104
|
* PFMAtchit requires LF in it's files instead of CRLF, but our FPTrack exporter used CRLF. Now fixed.
|
|
101
105
|
* Changed PFMatchit exporter to export .txt files instead of .2dt
|
|
102
106
|
|
|
103
|
-
=== 2.2.0
|
|
107
|
+
=== 2.2.0
|
|
104
108
|
|
|
105
109
|
* Improve documentation substantially
|
|
106
110
|
* Changed the Import::Base interface yo use enumeration instead of @receiver.
|
|
107
111
|
Upside: This allows us to convert importers to an array of trackers and other niceties.
|
|
108
112
|
Downside: stream_parse will be deprecated. It is however still available for backwards compatibility
|
|
109
113
|
|
|
110
|
-
=== 2.1.1
|
|
114
|
+
=== 2.1.1
|
|
111
115
|
|
|
112
116
|
* Fix handling of Shake scripts containing stabilizer nodes with no animation
|
|
113
117
|
* Remove underscores from tracker names exported to Syntheyes to prevent spaces from being generated
|
|
114
118
|
|
|
115
|
-
=== 2.1.0
|
|
119
|
+
=== 2.1.0
|
|
116
120
|
* Adds PFMatchit import support. Also all PFTrack imported cameras will have a camera name injected into the tracker
|
|
117
121
|
* Adds a PFMatchit exporter (PFMatchit only wants cameras with numbers in the name)
|
|
118
122
|
|
|
119
|
-
=== 2.0.2
|
|
123
|
+
=== 2.0.2
|
|
120
124
|
* Compatible with Ruby 1.9.2
|
|
121
125
|
* Scaler middleware now supports negative scaling factors
|
|
122
126
|
|
|
123
|
-
=== 2.0.0
|
|
127
|
+
=== 2.0.0
|
|
124
128
|
* Bugfix for PFTrack exports to contain cross-platform linebreaks (rn instead of n)
|
|
125
129
|
|
|
126
|
-
=== 1.9.9
|
|
130
|
+
=== 1.9.9
|
|
127
131
|
|
|
128
132
|
* Buffer the parsed trackers on disk or in a stream (all backwards-compatible). Substantially reduces conversion times and memory
|
|
129
133
|
usage on huge files.
|
|
130
134
|
|
|
131
|
-
=== 1.9.8
|
|
135
|
+
=== 1.9.8
|
|
132
136
|
|
|
133
137
|
* Very minor changes and improvements
|
|
134
138
|
* The app will now tell you when you try to feed it an empty file
|
|
135
139
|
* Change Synetheyes exports to start with a standard frame and not a keyframe to make 1-frame trackers work
|
|
136
140
|
* Adds a flip middleware to mirror a tracked comp
|
|
137
141
|
|
|
138
|
-
=== 1.9.6
|
|
142
|
+
=== 1.9.6
|
|
139
143
|
|
|
140
144
|
* Support Tracker nodes in Shake scripts that come from an old (ages old!) Shake version
|
|
141
145
|
* Only parse channels that are actually relevant in the Flame importer
|
|
142
146
|
|
|
143
|
-
=== 1.9.5
|
|
147
|
+
=== 1.9.5
|
|
144
148
|
|
|
145
149
|
* More stringently check for trackers in the Shake script importer (helps from recognizing arbitrary variables as trackers)
|
|
146
150
|
* Increase the size of the in-mem string export buffer
|
|
147
151
|
|
|
148
|
-
=== 1.9.4
|
|
152
|
+
=== 1.9.4
|
|
149
153
|
|
|
150
154
|
* Fix the boujou exporter to not crash boujou 5
|
|
151
155
|
|
|
152
|
-
=== 1.9.3
|
|
156
|
+
=== 1.9.3
|
|
153
157
|
|
|
154
158
|
* Add direct export to boujou feature tracks
|
|
155
159
|
* Automatically check for new versions and alert the user that he needs an update
|
|
156
160
|
* Add tests for the commandline binary itself
|
|
157
161
|
|
|
158
|
-
=== 1.9.2
|
|
162
|
+
=== 1.9.2
|
|
159
163
|
|
|
160
164
|
* Fix a crasher when the progress bar was being set higher than 100 percent
|
|
161
165
|
|
|
162
|
-
=== 1.9.1
|
|
166
|
+
=== 1.9.1
|
|
163
167
|
|
|
164
168
|
* Fix a Pipeline bug introduced with the last version
|
|
165
169
|
|
|
166
|
-
=== 1.9.0
|
|
170
|
+
=== 1.9.0
|
|
167
171
|
|
|
168
172
|
* Use proper progress bars
|
|
169
173
|
* Allow proper chaining of middlewares in the commandline app - you can now apply many middlewares of the same nature in chain, and they will be ordered correctly
|
|
170
174
|
* Small rewrites to Pipeline::Base (changes API slightly - please consult the docs)
|
|
171
175
|
|
|
172
|
-
=== 1.8.4
|
|
176
|
+
=== 1.8.4
|
|
173
177
|
|
|
174
178
|
* Fix PFTrack imports neglecting the feature name if it only contained digits
|
|
175
179
|
|
|
176
|
-
=== 1.8.3
|
|
180
|
+
=== 1.8.3
|
|
177
181
|
|
|
178
182
|
* Fix faulty remaining trackers report being sent from the pipeline
|
|
179
183
|
|
|
180
|
-
=== 1.8.2
|
|
184
|
+
=== 1.8.2
|
|
181
185
|
|
|
182
186
|
* Fix the bug in the Flame exporter that was convincing Flame that there is only one tracker in the setup
|
|
183
187
|
* Buffer temporary outputs to String buffers until they reach a certain size. Helps with tempfile pollution and IO speed
|
|
184
188
|
|
|
185
|
-
=== 1.8.1
|
|
189
|
+
=== 1.8.1
|
|
186
190
|
|
|
187
191
|
* Add Flame stabilizer export support
|
|
188
192
|
|
|
189
|
-
=== 1.7.5
|
|
193
|
+
=== 1.7.5
|
|
190
194
|
|
|
191
195
|
* Use a special IO so that we can display progress when parsing/reading a file (based on the IO offset)
|
|
192
196
|
|
|
193
|
-
=== 1.7.4
|
|
197
|
+
=== 1.7.4
|
|
194
198
|
|
|
195
199
|
* Introduce an intentional gap in the reference exports to test trackers with gaps
|
|
196
200
|
* Export Syntheyes paths as normal frames, not as keyframes. This produces better solves by not overconstraining the solver
|
|
197
201
|
(Without this TransitionFrms, a crucial parameter in SY, seizes to work)
|
|
198
202
|
* Add a LengthCutoff middleware that allows you to remove trackers that have less than X keyframes in them from the export
|
|
199
203
|
|
|
200
|
-
=== 1.7.3
|
|
204
|
+
=== 1.7.3
|
|
201
205
|
|
|
202
206
|
* Fixed the --only option in the commandline binary
|
|
203
207
|
|
|
204
|
-
=== 1.7.2
|
|
208
|
+
=== 1.7.2
|
|
205
209
|
|
|
206
210
|
* Add a Lerp middleware that linearly interpolates missing keyframes (USE CAREFULLY!)
|
|
207
211
|
* Prevent the Shake lexer from walking into the woods on files that are certainly wrong
|
|
208
212
|
* Export proper project length with Nuke scripts
|
|
209
213
|
* Ensure preamble for Nuke exports does not get overriden in width/height
|
|
210
214
|
|
|
211
|
-
=== 1.7.1
|
|
215
|
+
=== 1.7.1
|
|
212
216
|
|
|
213
217
|
* Fix Ruby 1.9 compatibility
|
|
214
218
|
|
|
215
|
-
=== 1.7.0
|
|
219
|
+
=== 1.7.0
|
|
216
220
|
|
|
217
221
|
* Fix edge cases of specific comp sizes outputting incorrect exports for Equalizer 3 and MatchMover
|
|
218
222
|
|
|
219
|
-
=== 1.6.9
|
|
223
|
+
=== 1.6.9
|
|
220
224
|
|
|
221
225
|
* Make the commandline progress reports shorter
|
|
222
226
|
|
|
223
|
-
=== 1.6.8
|
|
227
|
+
=== 1.6.8
|
|
224
228
|
|
|
225
229
|
* Fix frame gap handling for repeating gaps in the Nuke importer
|
|
226
230
|
|
|
227
|
-
=== 1.6.7
|
|
231
|
+
=== 1.6.7
|
|
228
232
|
|
|
229
233
|
* Fix frame gap sizes in the Nuke exporter (thanks Michael Lester)
|
|
230
234
|
|
|
231
|
-
=== 1.6.6
|
|
235
|
+
=== 1.6.6
|
|
232
236
|
|
|
233
237
|
* Handle Hermite cuves in Shake scripts
|
|
234
238
|
|
|
235
|
-
=== 1.6.5
|
|
239
|
+
=== 1.6.5
|
|
236
240
|
|
|
237
241
|
* Adds the --only option for the tracksperanto binary to only export a specific format
|
|
238
242
|
* Automatically unlink tempfiles in the Equalizer4 exporter
|
|
239
243
|
|
|
240
|
-
=== 1.6.4
|
|
244
|
+
=== 1.6.4
|
|
241
245
|
|
|
242
246
|
* Adds Boujou 2d feature import support (to export for Boujou use the Shake text format)
|
|
243
247
|
|
|
244
|
-
=== 1.6.3
|
|
248
|
+
=== 1.6.3
|
|
245
249
|
|
|
246
250
|
* Fixes the Shake importer so that it doesn't apply correlation curves if they are not present or constantized to 1
|
|
247
251
|
|
|
248
|
-
=== 1.6.2
|
|
252
|
+
=== 1.6.2
|
|
249
253
|
|
|
250
254
|
* Fixes the Reformat middleware to not suppress the end_export call. Crucial for exporters that
|
|
251
255
|
use end_export to finalize output
|
|
252
256
|
|
|
253
|
-
=== 1.6.0
|
|
257
|
+
=== 1.6.0
|
|
254
258
|
|
|
255
259
|
* MatchMover has top-left coordinates - fixed for both import and export
|
|
256
260
|
* Prevent Tracker from being Array#flatten'ed
|
|
257
261
|
|
|
258
|
-
=== 1.5.7
|
|
262
|
+
=== 1.5.7
|
|
259
263
|
|
|
260
264
|
* Add a Prefix middleware that prefixes tracker names
|
|
261
265
|
|
|
262
|
-
=== 1.5.6
|
|
266
|
+
=== 1.5.6
|
|
263
267
|
|
|
264
268
|
* Rerelase of 1.5.5 without the huge binary blob in the middle
|
|
265
269
|
* Interpret Shake NSplines as Linear instead of discarding them
|
|
266
270
|
|
|
267
|
-
=== 1.5.4
|
|
271
|
+
=== 1.5.4
|
|
268
272
|
|
|
269
273
|
* Fix a bug in the Shake importer for tracks that have no animation
|
|
270
274
|
|
|
271
|
-
=== 1.5.
|
|
275
|
+
=== 1.5.37
|
|
272
276
|
|
|
273
277
|
* Fix a bug in the Nuke importer for tracks that have no animation
|
|
274
278
|
|
|
275
|
-
=== 1.5.2
|
|
279
|
+
=== 1.5.2
|
|
276
280
|
|
|
277
281
|
* Fix Windows-specific issue (Tempfile-related) in the Equalizer4 exporter
|
|
278
282
|
* Add Export::Base#just_export and Middleware::Base#just_export
|
|
279
283
|
|
|
280
|
-
=== 1.5.0
|
|
284
|
+
=== 1.5.0
|
|
281
285
|
|
|
282
286
|
* Implement support for older 3DE exports (in and out)
|
|
283
287
|
|
|
284
|
-
=== 1.4.0
|
|
288
|
+
=== 1.4.0
|
|
285
289
|
|
|
286
290
|
* Implement MayaLive import and export
|
|
287
291
|
|
|
288
|
-
=== 1.3.1
|
|
292
|
+
=== 1.3.1
|
|
289
293
|
|
|
290
294
|
* Implement 3DE import and export
|
|
291
295
|
|
|
292
|
-
=== 1.2.7
|
|
296
|
+
=== 1.2.7
|
|
293
297
|
|
|
294
298
|
* Improved progress reporting
|
|
295
299
|
|
|
296
|
-
=== 1.2.6
|
|
300
|
+
=== 1.2.6
|
|
297
301
|
|
|
298
302
|
* Add const_name to the classes being introspected most often
|
|
299
303
|
|
|
300
|
-
=== 1.2.5
|
|
304
|
+
=== 1.2.5
|
|
301
305
|
|
|
302
306
|
* Reset residual on Syntheyes imports to 0
|
|
303
307
|
|
|
304
|
-
=== 1.2.4
|
|
308
|
+
=== 1.2.4
|
|
305
309
|
|
|
306
310
|
* Write to files in binary mode
|
|
307
311
|
|
|
308
|
-
=== 1.2.3
|
|
312
|
+
=== 1.2.3
|
|
309
313
|
|
|
310
314
|
* Support both PFTrack 4 and 5
|
|
311
315
|
|
|
312
|
-
=== 1.2.1
|
|
316
|
+
=== 1.2.1
|
|
313
317
|
|
|
314
318
|
* Fixed the binary that was not able to properly pass the importer class to the pipeline
|
|
315
319
|
|
|
316
|
-
=== 1.2.0
|
|
320
|
+
=== 1.2.0
|
|
317
321
|
|
|
318
322
|
* Add experimental MatchMoverPro import and export support
|
|
319
323
|
* Rewrite the Shake parser, support MatchMove and Stabilize nodes and many tracks per node
|
|
@@ -324,6 +328,6 @@ Downside: stream_parse will be deprecated. It is however still available for bac
|
|
|
324
328
|
* Much improved test coverage
|
|
325
329
|
* Support Nuke import and export
|
|
326
330
|
|
|
327
|
-
=== 1.0.0
|
|
331
|
+
=== 1.0.0
|
|
328
332
|
|
|
329
333
|
* Welcome
|
data/README.rdoc
CHANGED
|
@@ -80,7 +80,7 @@ scaling a proxy track up). Consult the --help option to see what is available.
|
|
|
80
80
|
== Development
|
|
81
81
|
|
|
82
82
|
If you are interested in reusing Tracksperanto's code or adding modules to the software consult
|
|
83
|
-
the {short developer introduction}[DEVELOPER_DOCS.rdoc]
|
|
83
|
+
the {short developer introduction}[https://github.com/guerilla-di/tracksperanto/blob/master/DEVELOPER_DOCS.rdoc]
|
|
84
84
|
|
|
85
85
|
== Limitations
|
|
86
86
|
|
data/bin/tracksperanto
CHANGED
|
@@ -67,6 +67,17 @@ op.on(" -h", "--height HEIGHT_IN_PIXELS", Integer, "Absolute input comp height i
|
|
|
67
67
|
op.on(" -o", "--only EXPORTER_NAME", String, "Only export the selected format, format must be one of #{writers.join(", ")}") { |f| writer_class_name = f }
|
|
68
68
|
|
|
69
69
|
op.on(" -xs", "--xscale X_SCALING_FACTOR", Float, "Scale the result in X by this factor (1.0 is the default)", &mw("Scaler", :x_factor))
|
|
70
|
+
|
|
71
|
+
op.on(" -pad", "--pad PAD_FRACTION_VALUES_COMMA_SEPARATED", String, "Pad the comp by these ratios") do | pads|
|
|
72
|
+
left, right, top, bottom = pads.split(",").map{|e| e.to_f }
|
|
73
|
+
$middlewares.push(["Pad", {"left_pad" => left, "right_pad"=> right, "top_pad" => top, "bottom_pad" => bottom}])
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
op.on(" -crop", "--crop CROP_VALUES_COMMA_SEPARATED", String, "Crop or unpad the comp by these pixel values") do | pads|
|
|
77
|
+
left, right, top, bottom = pads.split(",").map{|e| e.to_i }
|
|
78
|
+
$middlewares.push(["Crop", {"left" => left, "right"=> right, "top" => top, "bottom" => bottom}])
|
|
79
|
+
end
|
|
80
|
+
|
|
70
81
|
op.on(" -ys", "--yscale Y_SCALING_FACTOR", Float, "Scale the result in Y by this factor (1.0 is the default)", &mw("Scaler", :y_factor))
|
|
71
82
|
op.on(" -t", "--trim", "Trim the start frames (do not allow negative frame values)", &mw("StartTrim", :enabled, true)) # Before slip!
|
|
72
83
|
op.on(" -s", "--slip FRAMES", Integer, "Slip the result by this number of frames, positive is 'later'", &mw("Slipper", :slip))
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Does the same as the Pad middleware but with absolute pixel values instead of fractionals
|
|
2
|
+
class Tracksperanto::Middleware::Crop < Tracksperanto::Middleware::Base
|
|
3
|
+
attr_accessor :top, :left, :right, :bottom
|
|
4
|
+
cast_to_int :top, :left, :right, :bottom
|
|
5
|
+
|
|
6
|
+
def start_export(w, h)
|
|
7
|
+
left_pad, right_pad, top_pad, bottom_pad = (left / w.to_f), (right / w.to_f), (top / h.to_f), (bottom / h.to_f)
|
|
8
|
+
@pad = Tracksperanto::Middleware::Pad.new(@exporter, :left_pad => left_pad, :right_pad => right_pad, :top_pad => top_pad, :bottom_pad => bottom_pad)
|
|
9
|
+
@pad.start_export(w, h)
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
# Redirect all method calls to @pad instead of @exporter
|
|
13
|
+
%w( start_tracker_segment end_tracker_segment export_point end_export).each do | m |
|
|
14
|
+
define_method(m){|*a| @pad.send(m, *a)}
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# This middleware pads the comp or crops it if given negative values. Use it to say unpad
|
|
2
|
+
# some fucked-up telecine transfers. The padding is in fractional units of the total width
|
|
3
|
+
# and height
|
|
4
|
+
class Tracksperanto::Middleware::Pad < Tracksperanto::Middleware::Base
|
|
5
|
+
attr_accessor :left_pad, :right_pad, :top_pad, :bottom_pad
|
|
6
|
+
|
|
7
|
+
cast_to_float :left_pad, :right_pad, :top_pad, :bottom_pad
|
|
8
|
+
|
|
9
|
+
def start_export(w, h)
|
|
10
|
+
@shift_left, @shift_bottom = w * left_pad, h * bottom_pad
|
|
11
|
+
w_mult = 1 + left_pad + right_pad
|
|
12
|
+
h_mult = 1 + bottom_pad + top_pad
|
|
13
|
+
super((w * w_mult).ceil, (h * h_mult).ceil)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def export_point(frame, float_x, float_y, float_residual)
|
|
17
|
+
super(frame, float_x - @shift_left, float_y - @shift_bottom, float_residual)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
data/lib/tracksperanto.rb
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
|
2
|
+
|
|
3
|
+
class CropMiddlewareTest < Test::Unit::TestCase
|
|
4
|
+
def test_crop_supports_hash_init
|
|
5
|
+
receiver = flexmock
|
|
6
|
+
m = Tracksperanto::Middleware::Crop.new(receiver, :left => 13, :right => 0, :top => 25)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def test_shift_bypasses_methods
|
|
10
|
+
receiver = flexmock
|
|
11
|
+
padded_w, padded_h = 720 - 60, 576 + 58
|
|
12
|
+
|
|
13
|
+
receiver.should_receive(:start_export).once.with(padded_w, padded_h)
|
|
14
|
+
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
|
15
|
+
receiver.should_receive(:export_point).once.with(1, 120.0, -28.0, 0)
|
|
16
|
+
receiver.should_receive(:end_tracker_segment).once
|
|
17
|
+
receiver.should_receive(:end_export).once
|
|
18
|
+
|
|
19
|
+
m = Tracksperanto::Middleware::Crop.new(receiver, :left => -60, :bottom => 58)
|
|
20
|
+
m.start_export(720, 576)
|
|
21
|
+
m.start_tracker_segment("Tracker")
|
|
22
|
+
m.export_point(1, 60, 30, 0)
|
|
23
|
+
m.end_tracker_segment
|
|
24
|
+
m.end_export
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
end
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
|
2
|
+
|
|
3
|
+
class PadMiddlewareTest < Test::Unit::TestCase
|
|
4
|
+
def test_shift_supports_hash_init
|
|
5
|
+
receiver = flexmock
|
|
6
|
+
m = Tracksperanto::Middleware::Pad.new(receiver,
|
|
7
|
+
:left_pad => 0.5, :right_pad => 0, :top_pad => -0.2)
|
|
8
|
+
assert_in_delta 0.5, m.left_pad, 0.001
|
|
9
|
+
assert_in_delta 0.0, m.bottom_pad, 0.001
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def test_shift_bypasses_methods
|
|
13
|
+
receiver = flexmock
|
|
14
|
+
padded_w, padded_h = (720 * 0.75).ceil, (576 * 1.1).ceil
|
|
15
|
+
|
|
16
|
+
receiver.should_receive(:start_export).once.with(padded_w, padded_h)
|
|
17
|
+
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
|
18
|
+
receiver.should_receive(:export_point).once.with(1, 240.0, -27.6, 0)
|
|
19
|
+
receiver.should_receive(:end_tracker_segment).once
|
|
20
|
+
receiver.should_receive(:end_export).once
|
|
21
|
+
|
|
22
|
+
m = Tracksperanto::Middleware::Pad.new(receiver, :left_pad => -0.25, :bottom_pad => 0.10)
|
|
23
|
+
m.start_export(720, 576)
|
|
24
|
+
m.start_tracker_segment("Tracker")
|
|
25
|
+
m.export_point(1, 60, 30, 0)
|
|
26
|
+
m.end_tracker_segment
|
|
27
|
+
m.end_export
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
end
|
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.8.
|
|
8
|
+
s.version = "2.8.5"
|
|
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 = "2011-
|
|
12
|
+
s.date = "2011-12-25"
|
|
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"]
|
|
@@ -56,12 +56,14 @@ Gem::Specification.new do |s|
|
|
|
56
56
|
"lib/import/shake_text.rb",
|
|
57
57
|
"lib/import/syntheyes.rb",
|
|
58
58
|
"lib/middleware/base.rb",
|
|
59
|
+
"lib/middleware/crop.rb",
|
|
59
60
|
"lib/middleware/flip.rb",
|
|
60
61
|
"lib/middleware/flop.rb",
|
|
61
62
|
"lib/middleware/golden.rb",
|
|
62
63
|
"lib/middleware/length_cutoff.rb",
|
|
63
64
|
"lib/middleware/lerp.rb",
|
|
64
65
|
"lib/middleware/lint.rb",
|
|
66
|
+
"lib/middleware/pad.rb",
|
|
65
67
|
"lib/middleware/prefix.rb",
|
|
66
68
|
"lib/middleware/reformat.rb",
|
|
67
69
|
"lib/middleware/scaler.rb",
|
|
@@ -129,12 +131,14 @@ Gem::Specification.new do |s|
|
|
|
129
131
|
"test/import/test_shake_script_import.rb",
|
|
130
132
|
"test/import/test_shake_text_import.rb",
|
|
131
133
|
"test/import/test_syntheyes_import.rb",
|
|
134
|
+
"test/middleware/test_crop_middleware.rb",
|
|
132
135
|
"test/middleware/test_flip_middleware.rb",
|
|
133
136
|
"test/middleware/test_flop_middleware.rb",
|
|
134
137
|
"test/middleware/test_golden_middleware.rb",
|
|
135
138
|
"test/middleware/test_length_cutoff_middleware.rb",
|
|
136
139
|
"test/middleware/test_lerp_middleware.rb",
|
|
137
140
|
"test/middleware/test_lint_middleware.rb",
|
|
141
|
+
"test/middleware/test_pad_middleware.rb",
|
|
138
142
|
"test/middleware/test_prefix.rb",
|
|
139
143
|
"test/middleware/test_reformat_middleware.rb",
|
|
140
144
|
"test/middleware/test_scaler_middleware.rb",
|
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.8.
|
|
4
|
+
version: 2.8.5
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,11 +9,11 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2011-
|
|
12
|
+
date: 2011-12-25 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: obuf
|
|
16
|
-
requirement: &
|
|
16
|
+
requirement: &10793450 !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ~>
|
|
@@ -21,10 +21,10 @@ dependencies:
|
|
|
21
21
|
version: 1.0.1
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
|
-
version_requirements: *
|
|
24
|
+
version_requirements: *10793450
|
|
25
25
|
- !ruby/object:Gem::Dependency
|
|
26
26
|
name: progressive_io
|
|
27
|
-
requirement: &
|
|
27
|
+
requirement: &10792500 !ruby/object:Gem::Requirement
|
|
28
28
|
none: false
|
|
29
29
|
requirements:
|
|
30
30
|
- - ~>
|
|
@@ -32,10 +32,10 @@ dependencies:
|
|
|
32
32
|
version: '1.0'
|
|
33
33
|
type: :runtime
|
|
34
34
|
prerelease: false
|
|
35
|
-
version_requirements: *
|
|
35
|
+
version_requirements: *10792500
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: flame_channel_parser
|
|
38
|
-
requirement: &
|
|
38
|
+
requirement: &10790820 !ruby/object:Gem::Requirement
|
|
39
39
|
none: false
|
|
40
40
|
requirements:
|
|
41
41
|
- - ~>
|
|
@@ -43,10 +43,10 @@ dependencies:
|
|
|
43
43
|
version: '3.0'
|
|
44
44
|
type: :runtime
|
|
45
45
|
prerelease: false
|
|
46
|
-
version_requirements: *
|
|
46
|
+
version_requirements: *10790820
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: progressbar
|
|
49
|
-
requirement: &
|
|
49
|
+
requirement: &10789080 !ruby/object:Gem::Requirement
|
|
50
50
|
none: false
|
|
51
51
|
requirements:
|
|
52
52
|
- - ~>
|
|
@@ -54,10 +54,10 @@ dependencies:
|
|
|
54
54
|
version: '0.9'
|
|
55
55
|
type: :runtime
|
|
56
56
|
prerelease: false
|
|
57
|
-
version_requirements: *
|
|
57
|
+
version_requirements: *10789080
|
|
58
58
|
- !ruby/object:Gem::Dependency
|
|
59
59
|
name: update_hints
|
|
60
|
-
requirement: &
|
|
60
|
+
requirement: &10788410 !ruby/object:Gem::Requirement
|
|
61
61
|
none: false
|
|
62
62
|
requirements:
|
|
63
63
|
- - ~>
|
|
@@ -65,10 +65,10 @@ dependencies:
|
|
|
65
65
|
version: '1.0'
|
|
66
66
|
type: :runtime
|
|
67
67
|
prerelease: false
|
|
68
|
-
version_requirements: *
|
|
68
|
+
version_requirements: *10788410
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: jeweler
|
|
71
|
-
requirement: &
|
|
71
|
+
requirement: &10787690 !ruby/object:Gem::Requirement
|
|
72
72
|
none: false
|
|
73
73
|
requirements:
|
|
74
74
|
- - ! '>='
|
|
@@ -76,10 +76,10 @@ dependencies:
|
|
|
76
76
|
version: '0'
|
|
77
77
|
type: :development
|
|
78
78
|
prerelease: false
|
|
79
|
-
version_requirements: *
|
|
79
|
+
version_requirements: *10787690
|
|
80
80
|
- !ruby/object:Gem::Dependency
|
|
81
81
|
name: rake
|
|
82
|
-
requirement: &
|
|
82
|
+
requirement: &10787260 !ruby/object:Gem::Requirement
|
|
83
83
|
none: false
|
|
84
84
|
requirements:
|
|
85
85
|
- - ! '>='
|
|
@@ -87,10 +87,10 @@ dependencies:
|
|
|
87
87
|
version: '0'
|
|
88
88
|
type: :development
|
|
89
89
|
prerelease: false
|
|
90
|
-
version_requirements: *
|
|
90
|
+
version_requirements: *10787260
|
|
91
91
|
- !ruby/object:Gem::Dependency
|
|
92
92
|
name: flexmock
|
|
93
|
-
requirement: &
|
|
93
|
+
requirement: &10786840 !ruby/object:Gem::Requirement
|
|
94
94
|
none: false
|
|
95
95
|
requirements:
|
|
96
96
|
- - ~>
|
|
@@ -98,10 +98,10 @@ dependencies:
|
|
|
98
98
|
version: '0.8'
|
|
99
99
|
type: :development
|
|
100
100
|
prerelease: false
|
|
101
|
-
version_requirements: *
|
|
101
|
+
version_requirements: *10786840
|
|
102
102
|
- !ruby/object:Gem::Dependency
|
|
103
103
|
name: cli_test
|
|
104
|
-
requirement: &
|
|
104
|
+
requirement: &10786400 !ruby/object:Gem::Requirement
|
|
105
105
|
none: false
|
|
106
106
|
requirements:
|
|
107
107
|
- - ~>
|
|
@@ -109,7 +109,7 @@ dependencies:
|
|
|
109
109
|
version: '1.0'
|
|
110
110
|
type: :development
|
|
111
111
|
prerelease: false
|
|
112
|
-
version_requirements: *
|
|
112
|
+
version_requirements: *10786400
|
|
113
113
|
description: Converts 2D track exports between different apps like Flame, MatchMover,
|
|
114
114
|
PFTrack...
|
|
115
115
|
email: me@julik.nl
|
|
@@ -158,12 +158,14 @@ files:
|
|
|
158
158
|
- lib/import/shake_text.rb
|
|
159
159
|
- lib/import/syntheyes.rb
|
|
160
160
|
- lib/middleware/base.rb
|
|
161
|
+
- lib/middleware/crop.rb
|
|
161
162
|
- lib/middleware/flip.rb
|
|
162
163
|
- lib/middleware/flop.rb
|
|
163
164
|
- lib/middleware/golden.rb
|
|
164
165
|
- lib/middleware/length_cutoff.rb
|
|
165
166
|
- lib/middleware/lerp.rb
|
|
166
167
|
- lib/middleware/lint.rb
|
|
168
|
+
- lib/middleware/pad.rb
|
|
167
169
|
- lib/middleware/prefix.rb
|
|
168
170
|
- lib/middleware/reformat.rb
|
|
169
171
|
- lib/middleware/scaler.rb
|
|
@@ -231,12 +233,14 @@ files:
|
|
|
231
233
|
- test/import/test_shake_script_import.rb
|
|
232
234
|
- test/import/test_shake_text_import.rb
|
|
233
235
|
- test/import/test_syntheyes_import.rb
|
|
236
|
+
- test/middleware/test_crop_middleware.rb
|
|
234
237
|
- test/middleware/test_flip_middleware.rb
|
|
235
238
|
- test/middleware/test_flop_middleware.rb
|
|
236
239
|
- test/middleware/test_golden_middleware.rb
|
|
237
240
|
- test/middleware/test_length_cutoff_middleware.rb
|
|
238
241
|
- test/middleware/test_lerp_middleware.rb
|
|
239
242
|
- test/middleware/test_lint_middleware.rb
|
|
243
|
+
- test/middleware/test_pad_middleware.rb
|
|
240
244
|
- test/middleware/test_prefix.rb
|
|
241
245
|
- test/middleware/test_reformat_middleware.rb
|
|
242
246
|
- test/middleware/test_scaler_middleware.rb
|