tracksperanto 2.9.3 → 2.9.4

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/Gemfile CHANGED
@@ -4,7 +4,7 @@ source :rubygems
4
4
  gem "obuf", "~> 1.0.4"
5
5
  gem "progressive_io", "~> 1.0"
6
6
  gem "flame_channel_parser", "~> 4.0"
7
- gem "progressbar", "~> 0.9"
7
+ gem "progressbar", "0.10.0"
8
8
  gem "update_hints", "~> 1.0"
9
9
 
10
10
  group :development do
data/History.txt CHANGED
@@ -1,4 +1,9 @@
1
- === 2.9.2
1
+ === 2.9.4
2
+
3
+ * Add MatchMover RZML import support
4
+ * Export Boujou trackers starting at frame 0, not at frame 1
5
+
6
+ === 2.9.3
2
7
 
3
8
  * Add export for AE null layers as a .jsx script
4
9
 
data/README.rdoc CHANGED
@@ -1,11 +1,5 @@
1
- = Tracksperanto
2
-
3
- * http://guerilla-di.org/tracksperanto
4
-
5
1
  {<img src="https://secure.travis-ci.org/guerilla-di/tracksperanto.png" />}[http://travis-ci.org/guerilla-di/tracksperanto]
6
2
 
7
- == Description
8
-
9
3
  Tracksperanto is a universal 2D-track translator between many apps.
10
4
 
11
5
  == Why Tracksperanto?
@@ -63,7 +57,7 @@ converted files already exist <b>they will be overwritten without warning</b>.
63
57
  Import and export support:
64
58
  * Nuke v5 script (Tracker3 nodes, also known as Tracker in the UI - this is the node that you track with)
65
59
  * Shake tracker node export (textfile with many tracks per file)
66
- * PFTrack 2dt files (version 4 and 5)
60
+ * PFTrack 2dt (version 4 and 5) anf PFMatchit/PFTrack 2011 point track exports
67
61
  * Syntheyes 2D tracking data exports
68
62
  * 3DE point exports (as output by the default script) - versions 3 and 4
69
63
  * MatchMover Pro .rz2
@@ -72,10 +66,12 @@ Import and export support:
72
66
  * Boujou feature track export
73
67
 
74
68
  Import only:
75
- * Shake script (Tracker, Matchmove and Stabilize nodes embedded in ANY shake script)
69
+ * Shake scripts (Tracker, Matchmove and Stabilize nodes embedded in ANY shake script)
70
+ * MatchMover RZML files
76
71
 
77
72
  Export only:
78
- * Ruby (will make calls to Tracksperanto to create trackers/keyframes)
73
+ * AfterEffects .jsx script that creates one null object per tracker (run through the script editor)
74
+ * Ruby (will make calls to Tracksperanto to create trackers/keyframes) - useful if you want to play with trackers as data
79
75
  * Maya locators (animated locators on an image plane)
80
76
 
81
77
  == Modularity
data/lib/export/boujou.rb CHANGED
@@ -29,6 +29,7 @@ class Tracksperanto::Export::Boujou < Tracksperanto::Export::Base
29
29
 
30
30
  def export_point(frame, abs_float_x, abs_float_y, float_residual)
31
31
  height_inv = @height - abs_float_y
32
- @io.puts(POINT_T % [@tracker_name, frame + 1, abs_float_x, height_inv])
32
+ # Frames in Boujou are likely to start from 0
33
+ @io.puts(POINT_T % [@tracker_name, frame, abs_float_x, height_inv])
33
34
  end
34
35
  end
data/lib/export/cosa.rb CHANGED
@@ -1,8 +1,9 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # Export each tracker as an AfterEffects script creating nulls
2
+ # Exports trackers as an AfterEffects script creating nulls
3
3
  class Tracksperanto::Export::AE < Tracksperanto::Export::Base
4
4
 
5
- PREAMBLE = 'function convertFrameToSeconds(layerWithFootage, frameValue)
5
+ PREAMBLE = '// Run this script from the Script Editor
6
+ function convertFrameToSeconds(layerWithFootage, frameValue)
6
7
  {
7
8
  var comp = layerWithFootage.containingComp;
8
9
  var rate = 1.0 / comp.frameDuration;
@@ -0,0 +1,81 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require "rexml/document"
3
+
4
+ class Tracksperanto::Import::MatchMoverRZML < Tracksperanto::Import::Base
5
+
6
+ def self.autodetects_size?
7
+ true
8
+ end
9
+
10
+ def self.human_name
11
+ "MatchMover RZML .rzml file"
12
+ end
13
+
14
+ def self.distinct_file_ext
15
+ ".rzml"
16
+ end
17
+
18
+ class Listener
19
+
20
+ def initialize(from_parser, tracker_callback)
21
+ @cb = tracker_callback
22
+ @path = []
23
+ @parser = from_parser
24
+ @trackers = []
25
+ end
26
+
27
+ def depth
28
+ @path.length
29
+ end
30
+
31
+ def tag_start(element_name, attrs)
32
+ @path << element_name.downcase
33
+
34
+ if element_name.downcase == 'shot'
35
+ @parser.width = attrs["w"]
36
+ @parser.height = attrs["h"]
37
+ end
38
+
39
+ return unless @path.include?("ipln")
40
+
41
+ # <IPLN img="/home/torsten/some_local_nuke_scripts/render_tmp/md_145_1070_right.####.jpg" b="1" e="71">
42
+ # <IFRM>
43
+ # <M i="1" k="i" x="626.68" y="488.56" tt="0.8000000119" cf="0">
44
+ if element_name.downcase == 'm'
45
+ @trackers.push(Tracksperanto::Tracker.new(:name => attrs["i"]))
46
+ end
47
+
48
+ if element_name.downcase == "ifrm" && attrs["t"]
49
+ @frame = attrs["t"].to_i
50
+ end
51
+
52
+ if element_name.downcase == "m"
53
+ target_marker = @trackers.find{|e| e.name == attrs["i"] }
54
+ target_marker.keyframe!(:frame => @frame, :abs_x => attrs["x"], :abs_y => (@parser.height - attrs["y"].to_f), :residual => attrs["tt"])
55
+ end
56
+ end
57
+
58
+ def tag_end(element_name)
59
+ @path.pop
60
+ if element_name.downcase == "rzml"
61
+ @trackers.reject!{|e| e.empty? }
62
+
63
+ @trackers.each do | recovered_tracker |
64
+ @cb.call(recovered_tracker)
65
+ end
66
+ end
67
+ end
68
+
69
+ def in?(path_elems)
70
+ File.join(@path).include?(path_elems)
71
+ end
72
+
73
+ def xmldecl(*a); end
74
+ def text(t); end
75
+ end
76
+
77
+ def each
78
+ cb = lambda{|e| yield(e) }
79
+ REXML::Document.parse_stream(@io, Listener.new(self, cb))
80
+ end
81
+ end
data/lib/tracksperanto.rb CHANGED
@@ -8,7 +8,7 @@ require "progressive_io"
8
8
 
9
9
  module Tracksperanto
10
10
  PATH = File.expand_path(File.dirname(__FILE__))
11
- VERSION = '2.9.3'
11
+ VERSION = '2.9.4'
12
12
 
13
13
  module Import; end
14
14
  module Export; end
@@ -1,3 +1,4 @@
1
+ // Run this script from the Script Editor
1
2
  function convertFrameToSeconds(layerWithFootage, frameValue)
2
3
  {
3
4
  var comp = layerWithFootage.containingComp;
@@ -3,42 +3,42 @@
3
3
  # Creation date : Thu Apr 15 17:21:26 2010
4
4
  #
5
5
  # track_id view x y
6
- Parabolic_1_from_top_left 1 0.000 0.000
7
- Parabolic_1_from_top_left 2 96.000 205.200
8
- Parabolic_1_from_top_left 3 192.000 388.800
9
- Parabolic_1_from_top_left 4 288.000 550.800
10
- Parabolic_1_from_top_left 5 384.000 691.200
11
- Parabolic_1_from_top_left 6 480.000 810.000
12
- Parabolic_1_from_top_left 7 576.000 907.200
13
- Parabolic_1_from_top_left 8 672.000 982.800
14
- Parabolic_1_from_top_left 9 768.000 1036.800
15
- Parabolic_1_from_top_left 10 864.000 1069.200
16
- Parabolic_1_from_top_left 13 1152.000 1036.800
17
- Parabolic_1_from_top_left 14 1248.000 982.800
18
- Parabolic_1_from_top_left 15 1344.000 907.200
19
- Parabolic_1_from_top_left 16 1440.000 810.000
20
- Parabolic_1_from_top_left 17 1536.000 691.200
21
- Parabolic_1_from_top_left 18 1632.000 550.800
22
- Parabolic_1_from_top_left 19 1728.000 388.800
23
- Parabolic_1_from_top_left 20 1824.000 205.200
24
- Parabolic_1_from_top_left 21 1920.000 0.000
25
- Parabolic_2_from_bottom_right 1 1920.000 1080.000
26
- Parabolic_2_from_bottom_right 2 1824.000 874.800
27
- Parabolic_2_from_bottom_right 3 1728.000 691.200
28
- Parabolic_2_from_bottom_right 4 1632.000 529.200
29
- Parabolic_2_from_bottom_right 5 1536.000 388.800
30
- Parabolic_2_from_bottom_right 6 1440.000 270.000
31
- Parabolic_2_from_bottom_right 7 1344.000 172.800
32
- Parabolic_2_from_bottom_right 8 1248.000 97.200
33
- Parabolic_2_from_bottom_right 9 1152.000 43.200
34
- Parabolic_2_from_bottom_right 10 1056.000 10.800
35
- Parabolic_2_from_bottom_right 13 768.000 43.200
36
- Parabolic_2_from_bottom_right 14 672.000 97.200
37
- Parabolic_2_from_bottom_right 15 576.000 172.800
38
- Parabolic_2_from_bottom_right 16 480.000 270.000
39
- Parabolic_2_from_bottom_right 17 384.000 388.800
40
- Parabolic_2_from_bottom_right 18 288.000 529.200
41
- Parabolic_2_from_bottom_right 19 192.000 691.200
42
- Parabolic_2_from_bottom_right 20 96.000 874.800
43
- Parabolic_2_from_bottom_right 21 0.000 1080.000
44
- SingleFrame 1 970.000 530.000
6
+ Parabolic_1_from_top_left 0 0.000 0.000
7
+ Parabolic_1_from_top_left 1 96.000 205.200
8
+ Parabolic_1_from_top_left 2 192.000 388.800
9
+ Parabolic_1_from_top_left 3 288.000 550.800
10
+ Parabolic_1_from_top_left 4 384.000 691.200
11
+ Parabolic_1_from_top_left 5 480.000 810.000
12
+ Parabolic_1_from_top_left 6 576.000 907.200
13
+ Parabolic_1_from_top_left 7 672.000 982.800
14
+ Parabolic_1_from_top_left 8 768.000 1036.800
15
+ Parabolic_1_from_top_left 9 864.000 1069.200
16
+ Parabolic_1_from_top_left 12 1152.000 1036.800
17
+ Parabolic_1_from_top_left 13 1248.000 982.800
18
+ Parabolic_1_from_top_left 14 1344.000 907.200
19
+ Parabolic_1_from_top_left 15 1440.000 810.000
20
+ Parabolic_1_from_top_left 16 1536.000 691.200
21
+ Parabolic_1_from_top_left 17 1632.000 550.800
22
+ Parabolic_1_from_top_left 18 1728.000 388.800
23
+ Parabolic_1_from_top_left 19 1824.000 205.200
24
+ Parabolic_1_from_top_left 20 1920.000 0.000
25
+ Parabolic_2_from_bottom_right 0 1920.000 1080.000
26
+ Parabolic_2_from_bottom_right 1 1824.000 874.800
27
+ Parabolic_2_from_bottom_right 2 1728.000 691.200
28
+ Parabolic_2_from_bottom_right 3 1632.000 529.200
29
+ Parabolic_2_from_bottom_right 4 1536.000 388.800
30
+ Parabolic_2_from_bottom_right 5 1440.000 270.000
31
+ Parabolic_2_from_bottom_right 6 1344.000 172.800
32
+ Parabolic_2_from_bottom_right 7 1248.000 97.200
33
+ Parabolic_2_from_bottom_right 8 1152.000 43.200
34
+ Parabolic_2_from_bottom_right 9 1056.000 10.800
35
+ Parabolic_2_from_bottom_right 12 768.000 43.200
36
+ Parabolic_2_from_bottom_right 13 672.000 97.200
37
+ Parabolic_2_from_bottom_right 14 576.000 172.800
38
+ Parabolic_2_from_bottom_right 15 480.000 270.000
39
+ Parabolic_2_from_bottom_right 16 384.000 388.800
40
+ Parabolic_2_from_bottom_right 17 288.000 529.200
41
+ Parabolic_2_from_bottom_right 18 192.000 691.200
42
+ Parabolic_2_from_bottom_right 19 96.000 874.800
43
+ Parabolic_2_from_bottom_right 20 0.000 1080.000
44
+ SingleFrame 0 970.000 530.000
@@ -0,0 +1,34 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require File.expand_path(File.dirname(__FILE__)) + '/../helper'
3
+
4
+ class MatchMoverRZMLImportTest < Test::Unit::TestCase
5
+ DELTA = 0.1
6
+
7
+ P = File.dirname(__FILE__) + '/samples/match_mover_rzml/md_145_1070_right_t1.rzml'
8
+
9
+ def test_introspects_properly
10
+ i = Tracksperanto::Import::MatchMoverRZML
11
+ assert_equal "MatchMover RZML .rzml file", i.human_name
12
+ assert i.autodetects_size?
13
+ end
14
+
15
+ def test_parsing_from_matchmover
16
+ fixture = File.open(P)
17
+
18
+ parser = Tracksperanto::Import::MatchMoverRZML.new(:io => fixture)
19
+ trackers = parser.to_a
20
+
21
+ assert_equal 2048, parser.width
22
+ assert_equal 1152, parser.height
23
+
24
+ assert_equal 2, trackers.length
25
+ t = trackers[0]
26
+
27
+ assert_equal 0, trackers[0][0].frame
28
+ assert_equal 1, trackers[0][1].frame
29
+
30
+ assert_in_delta 626.7, trackers[0][0].abs_x, DELTA
31
+ assert_in_delta 663.4, trackers[0][0].abs_y, DELTA
32
+ end
33
+
34
+ end
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "tracksperanto"
8
- s.version = "2.9.3"
8
+ s.version = "2.9.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 = "2012-01-28"
12
+ s.date = "2012-02-08"
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"]
@@ -49,6 +49,7 @@ Gem::Specification.new do |s|
49
49
  "lib/import/equalizer4.rb",
50
50
  "lib/import/flame_stabilizer.rb",
51
51
  "lib/import/match_mover.rb",
52
+ "lib/import/match_mover_rzml.rb",
52
53
  "lib/import/maya_live.rb",
53
54
  "lib/import/nuke_grammar/utils.rb",
54
55
  "lib/import/nuke_script.rb",
@@ -133,6 +134,7 @@ Gem::Specification.new do |s|
133
134
  "test/import/test_boujou_import.rb",
134
135
  "test/import/test_flame_import.rb",
135
136
  "test/import/test_match_mover_import.rb",
137
+ "test/import/test_match_mover_rzml_import.rb",
136
138
  "test/import/test_maya_live_import.rb",
137
139
  "test/import/test_nuke_import.rb",
138
140
  "test/import/test_pftrack_import.rb",
@@ -181,7 +183,7 @@ Gem::Specification.new do |s|
181
183
  s.add_runtime_dependency(%q<obuf>, ["~> 1.0.4"])
182
184
  s.add_runtime_dependency(%q<progressive_io>, ["~> 1.0"])
183
185
  s.add_runtime_dependency(%q<flame_channel_parser>, ["~> 4.0"])
184
- s.add_runtime_dependency(%q<progressbar>, ["~> 0.9"])
186
+ s.add_runtime_dependency(%q<progressbar>, ["= 0.10.0"])
185
187
  s.add_runtime_dependency(%q<update_hints>, ["~> 1.0"])
186
188
  s.add_development_dependency(%q<jeweler>, [">= 0"])
187
189
  s.add_development_dependency(%q<rake>, [">= 0"])
@@ -191,7 +193,7 @@ Gem::Specification.new do |s|
191
193
  s.add_dependency(%q<obuf>, ["~> 1.0.4"])
192
194
  s.add_dependency(%q<progressive_io>, ["~> 1.0"])
193
195
  s.add_dependency(%q<flame_channel_parser>, ["~> 4.0"])
194
- s.add_dependency(%q<progressbar>, ["~> 0.9"])
196
+ s.add_dependency(%q<progressbar>, ["= 0.10.0"])
195
197
  s.add_dependency(%q<update_hints>, ["~> 1.0"])
196
198
  s.add_dependency(%q<jeweler>, [">= 0"])
197
199
  s.add_dependency(%q<rake>, [">= 0"])
@@ -202,7 +204,7 @@ Gem::Specification.new do |s|
202
204
  s.add_dependency(%q<obuf>, ["~> 1.0.4"])
203
205
  s.add_dependency(%q<progressive_io>, ["~> 1.0"])
204
206
  s.add_dependency(%q<flame_channel_parser>, ["~> 4.0"])
205
- s.add_dependency(%q<progressbar>, ["~> 0.9"])
207
+ s.add_dependency(%q<progressbar>, ["= 0.10.0"])
206
208
  s.add_dependency(%q<update_hints>, ["~> 1.0"])
207
209
  s.add_dependency(%q<jeweler>, [">= 0"])
208
210
  s.add_dependency(%q<rake>, [">= 0"])
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.9.3
4
+ version: 2.9.4
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: 2012-01-28 00:00:00.000000000 Z
12
+ date: 2012-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: obuf
16
- requirement: &4002190 !ruby/object:Gem::Requirement
16
+ requirement: &3822710 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.4
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *4002190
24
+ version_requirements: *3822710
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: progressive_io
27
- requirement: &4001450 !ruby/object:Gem::Requirement
27
+ requirement: &3822230 !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: *4001450
35
+ version_requirements: *3822230
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: flame_channel_parser
38
- requirement: &4000830 !ruby/object:Gem::Requirement
38
+ requirement: &3821780 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,21 +43,21 @@ dependencies:
43
43
  version: '4.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *4000830
46
+ version_requirements: *3821780
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: progressbar
49
- requirement: &4000140 !ruby/object:Gem::Requirement
49
+ requirement: &3821310 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ~>
52
+ - - =
53
53
  - !ruby/object:Gem::Version
54
- version: '0.9'
54
+ version: 0.10.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *4000140
57
+ version_requirements: *3821310
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: update_hints
60
- requirement: &3999670 !ruby/object:Gem::Requirement
60
+ requirement: &3820990 !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: *3999670
68
+ version_requirements: *3820990
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: jeweler
71
- requirement: &3998710 !ruby/object:Gem::Requirement
71
+ requirement: &3820670 !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: *3998710
79
+ version_requirements: *3820670
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rake
82
- requirement: &3998020 !ruby/object:Gem::Requirement
82
+ requirement: &3820350 !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: *3998020
90
+ version_requirements: *3820350
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: flexmock
93
- requirement: &3996680 !ruby/object:Gem::Requirement
93
+ requirement: &3820050 !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: *3996680
101
+ version_requirements: *3820050
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: cli_test
104
- requirement: &3995630 !ruby/object:Gem::Requirement
104
+ requirement: &3819760 !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: *3995630
112
+ version_requirements: *3819760
113
113
  description: Converts 2D track exports between different apps like Flame, MatchMover,
114
114
  PFTrack...
115
115
  email: me@julik.nl
@@ -151,6 +151,7 @@ files:
151
151
  - lib/import/equalizer4.rb
152
152
  - lib/import/flame_stabilizer.rb
153
153
  - lib/import/match_mover.rb
154
+ - lib/import/match_mover_rzml.rb
154
155
  - lib/import/maya_live.rb
155
156
  - lib/import/nuke_grammar/utils.rb
156
157
  - lib/import/nuke_script.rb
@@ -235,6 +236,7 @@ files:
235
236
  - test/import/test_boujou_import.rb
236
237
  - test/import/test_flame_import.rb
237
238
  - test/import/test_match_mover_import.rb
239
+ - test/import/test_match_mover_rzml_import.rb
238
240
  - test/import/test_maya_live_import.rb
239
241
  - test/import/test_nuke_import.rb
240
242
  - test/import/test_pftrack_import.rb