flame_channel_parser 4.0.2 → 4.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.travis.yml +6 -1
- data/Gemfile +2 -9
- data/History.txt +4 -0
- data/{README.rdoc → README.md} +33 -14
- data/Rakefile +3 -21
- data/bin/bake_flame_channel +1 -1
- data/bin/flame_channel_inspect +26 -0
- data/flame_channel_parser.gemspec +11 -113
- data/lib/flame_channel_parser.rb +3 -2
- data/lib/flame_channel_parser/version.rb +3 -0
- data/lib/inspector.rb +74 -0
- data/lib/xml_parser.rb +11 -12
- data/test/stabilizer_examples/2014_cornerpin_points.stabilizer +16835 -0
- data/test/test_flame_channel_parser.rb +0 -1
- data/test/test_inspector.rb +39 -0
- data/test/test_inspector_ref_output_stabilizer.txt +76 -0
- data/test/test_inspector_ref_output_timewarp.txt +10 -0
- data/test/test_interpolator.rb +11 -3
- metadata +59 -38
@@ -0,0 +1,39 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
class TestInspector < Test::Unit::TestCase
|
4
|
+
REF_TIMEWARP = File.dirname(__FILE__) + "/snaps/TW.timewarp"
|
5
|
+
REF_TIMEWARP_OUTPUT_PATH = File.dirname(__FILE__) + "/test_inspector_ref_output_timewarp.txt"
|
6
|
+
|
7
|
+
REF_STABILIZER = File.dirname(__FILE__) + '/stabilizer_examples/2014_cornerpin_points.stabilizer'
|
8
|
+
REF_STABILIZER_OUTPUT_PATH = File.dirname(__FILE__) + "/test_inspector_ref_output_stabilizer.txt"
|
9
|
+
|
10
|
+
def test_inspecting_baked_timewarp_from_2011
|
11
|
+
data = File.open(REF_TIMEWARP)
|
12
|
+
channels = FlameChannelParser.parse(data)
|
13
|
+
|
14
|
+
inspector = FlameChannelParser::Inspector.new(channels)
|
15
|
+
output = ''
|
16
|
+
|
17
|
+
inspector.pretty_print(StringIO.new(output))
|
18
|
+
|
19
|
+
#File.open(REF_TIMEWARP_OUTPUT_PATH, 'w'){|f| f << output }
|
20
|
+
|
21
|
+
ref = File.read(REF_TIMEWARP_OUTPUT_PATH)
|
22
|
+
assert_equal ref, output
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_parsing_stabilizer_from_2014
|
26
|
+
data = File.open(REF_STABILIZER)
|
27
|
+
channels = FlameChannelParser.parse(data)
|
28
|
+
|
29
|
+
inspector = FlameChannelParser::Inspector.new(channels)
|
30
|
+
output = ''
|
31
|
+
|
32
|
+
inspector.pretty_print(StringIO.new(output))
|
33
|
+
|
34
|
+
#File.open(REF_STABILIZER_OUTPUT_PATH, 'w'){|f| f << output }
|
35
|
+
|
36
|
+
ref = File.read(REF_STABILIZER_OUTPUT_PATH)
|
37
|
+
assert_equal ref, output
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
tracker0_0
|
2
|
+
ref
|
3
|
+
x - animated, 1 key at 1, value 505.5
|
4
|
+
y - animated, 1 key at 1, value -496.5
|
5
|
+
width - no animations, value 10.0
|
6
|
+
height - no animations, value 10.0
|
7
|
+
dx - animated, 2 keys, first at 0 last at 1
|
8
|
+
dy - animated, 2 keys, first at 0 last at 1
|
9
|
+
track
|
10
|
+
x - no animations, value 960.0
|
11
|
+
y - no animations, value 540.0
|
12
|
+
width - no animations, value 15.0
|
13
|
+
height - no animations, value 15.0
|
14
|
+
shift
|
15
|
+
x - animated, 201 keys, first at 1 last at 201
|
16
|
+
y - animated, 201 keys, first at 1 last at 201
|
17
|
+
offset
|
18
|
+
x - no animations, value 0.0
|
19
|
+
y - no animations, value 0.0
|
20
|
+
tracker0_1
|
21
|
+
ref
|
22
|
+
x - animated, 1 key at 1, value 550.5
|
23
|
+
y - animated, 1 key at 1, value -12.5
|
24
|
+
width - no animations, value 10.0
|
25
|
+
height - no animations, value 10.0
|
26
|
+
dx - animated, 2 keys, first at 0 last at 1
|
27
|
+
dy - animated, 2 keys, first at 0 last at 1
|
28
|
+
track
|
29
|
+
x - no animations, value 960.0
|
30
|
+
y - no animations, value 540.0
|
31
|
+
width - no animations, value 15.0
|
32
|
+
height - no animations, value 15.0
|
33
|
+
shift
|
34
|
+
x - animated, 201 keys, first at 1 last at 201
|
35
|
+
y - animated, 201 keys, first at 1 last at 201
|
36
|
+
offset
|
37
|
+
x - no animations, value 0.0
|
38
|
+
y - no animations, value 0.0
|
39
|
+
tracker1_0
|
40
|
+
ref
|
41
|
+
x - animated, 1 key at 1, value 1409.75403
|
42
|
+
y - animated, 1 key at 1, value -504.210999
|
43
|
+
width - no animations, value 10.0
|
44
|
+
height - no animations, value 10.0
|
45
|
+
dx - animated, 2 keys, first at 0 last at 1
|
46
|
+
dy - animated, 2 keys, first at 0 last at 1
|
47
|
+
track
|
48
|
+
x - no animations, value 960.0
|
49
|
+
y - no animations, value 540.0
|
50
|
+
width - no animations, value 15.0
|
51
|
+
height - no animations, value 15.0
|
52
|
+
shift
|
53
|
+
x - animated, 201 keys, first at 1 last at 201
|
54
|
+
y - animated, 201 keys, first at 1 last at 201
|
55
|
+
offset
|
56
|
+
x - no animations, value 0.0
|
57
|
+
y - no animations, value 0.0
|
58
|
+
tracker1_1
|
59
|
+
ref
|
60
|
+
x - animated, 1 key at 1, value 1402.0
|
61
|
+
y - animated, 1 key at 1, value -13.0
|
62
|
+
width - no animations, value 10.0
|
63
|
+
height - no animations, value 10.0
|
64
|
+
dx - animated, 2 keys, first at 0 last at 1
|
65
|
+
dy - animated, 2 keys, first at 0 last at 1
|
66
|
+
track
|
67
|
+
x - no animations, value 960.0
|
68
|
+
y - no animations, value 540.0
|
69
|
+
width - no animations, value 15.0
|
70
|
+
height - no animations, value 15.0
|
71
|
+
shift
|
72
|
+
x - animated, 202 keys, first at 1 last at 202
|
73
|
+
y - animated, 202 keys, first at 1 last at 202
|
74
|
+
offset
|
75
|
+
x - no animations, value 0.0
|
76
|
+
y - no animations, value 0.0
|
@@ -0,0 +1,10 @@
|
|
1
|
+
Speed - animated, 816 keys, first at 1 last at 816
|
2
|
+
Timing
|
3
|
+
Timing - animated, 816 keys, first at 1 last at 816
|
4
|
+
Mix
|
5
|
+
Mix - no animations, value 0.0
|
6
|
+
Trail
|
7
|
+
Pre_Trail - no animations, value 1.0
|
8
|
+
Pre_Weight - no animations, value 100.0
|
9
|
+
Post_Trail - no animations, value 1.0
|
10
|
+
Post_Weight - no animations, value 100.0
|
data/test/test_interpolator.rb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
require "helper"
|
2
2
|
|
3
|
-
|
4
|
-
require File.dirname(__FILE__) + "/../lib/flame_channel_parser"
|
5
|
-
|
3
|
+
# TODO: refactor to not use the parser
|
6
4
|
class TestInterpolator < Test::Unit::TestCase
|
7
5
|
DELTA = 0.05
|
8
6
|
|
@@ -121,6 +119,16 @@ class TestInterpolator < Test::Unit::TestCase
|
|
121
119
|
assert_in_delta 374.75, interp.sample_at(300), DELTA
|
122
120
|
end
|
123
121
|
|
122
|
+
def test_xml_timewarp_with_float_frames
|
123
|
+
data = File.open(File.dirname(__FILE__) + "/snaps/BatchTimewarp_ext1.timewarp_node")
|
124
|
+
channels_in_tw = FlameChannelParser.parse(data)
|
125
|
+
chan = channels_in_tw.find{|c| c.name == "Timing"}
|
126
|
+
|
127
|
+
interp = chan.to_interpolator
|
128
|
+
assert_in_delta 1, interp.sample_at(1), DELTA
|
129
|
+
assert_in_delta 242.88, interp.sample_at(300), DELTA
|
130
|
+
end
|
131
|
+
|
124
132
|
def test_descending_linear_prepolate
|
125
133
|
data = File.open(File.dirname(__FILE__) + "/snaps/RefT_Steadicam.timewarp")
|
126
134
|
channels_in_tw = FlameChannelParser.parse(data)
|
metadata
CHANGED
@@ -1,71 +1,85 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame_channel_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
5
|
-
prerelease:
|
4
|
+
version: 4.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Julik Tarkhanov
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2018-12-19 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: update_hints
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '1.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
25
27
|
- !ruby/object:Gem::Dependency
|
26
28
|
name: framecurve
|
27
|
-
requirement:
|
28
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
29
30
|
requirements:
|
30
|
-
- - ~>
|
31
|
+
- - "~>"
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
33
|
+
version: '2'
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements:
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: jeweler
|
38
|
-
requirement: &10802450 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
37
|
requirements:
|
41
|
-
- -
|
38
|
+
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
44
|
-
type: :development
|
45
|
-
prerelease: false
|
46
|
-
version_requirements: *10802450
|
40
|
+
version: '2'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: rake
|
49
|
-
requirement:
|
50
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
51
44
|
requirements:
|
52
|
-
- -
|
45
|
+
- - ">="
|
53
46
|
- !ruby/object:Gem::Version
|
54
47
|
version: '0'
|
55
48
|
type: :development
|
56
49
|
prerelease: false
|
57
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
58
55
|
- !ruby/object:Gem::Dependency
|
59
56
|
name: cli_test
|
60
|
-
requirement:
|
61
|
-
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
65
|
requirements:
|
63
|
-
- - ~>
|
66
|
+
- - "~>"
|
64
67
|
- !ruby/object:Gem::Version
|
65
68
|
version: '1.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: test-unit
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
66
76
|
type: :development
|
67
77
|
prerelease: false
|
68
|
-
version_requirements:
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Reads and interpolates animation channels in IFFS setups
|
70
84
|
email: me@julik.nl
|
71
85
|
executables:
|
@@ -74,15 +88,17 @@ executables:
|
|
74
88
|
- framecurve_to_flame
|
75
89
|
extensions: []
|
76
90
|
extra_rdoc_files:
|
77
|
-
- README.
|
91
|
+
- README.md
|
78
92
|
files:
|
79
|
-
- .autotest
|
80
|
-
- .
|
93
|
+
- ".autotest"
|
94
|
+
- ".gitignore"
|
95
|
+
- ".travis.yml"
|
81
96
|
- Gemfile
|
82
97
|
- History.txt
|
83
|
-
- README.
|
98
|
+
- README.md
|
84
99
|
- Rakefile
|
85
100
|
- bin/bake_flame_channel
|
101
|
+
- bin/flame_channel_inspect
|
86
102
|
- bin/framecurve_from_flame
|
87
103
|
- bin/framecurve_to_flame
|
88
104
|
- flame_channel_parser.gemspec
|
@@ -90,6 +106,7 @@ files:
|
|
90
106
|
- lib/channel.rb
|
91
107
|
- lib/extractor.rb
|
92
108
|
- lib/flame_channel_parser.rb
|
109
|
+
- lib/flame_channel_parser/version.rb
|
93
110
|
- lib/framecurve_writers/base.rb
|
94
111
|
- lib/framecurve_writers/batch_timewarp.rb
|
95
112
|
- lib/framecurve_writers/kronos.rb
|
@@ -98,6 +115,7 @@ files:
|
|
98
115
|
- lib/framecurve_writers/templates/SampleKronos.F_Kronos
|
99
116
|
- lib/framecurve_writers/templates/TW_Sample.timewarp
|
100
117
|
- lib/framecurve_writers/templates/key.xml
|
118
|
+
- lib/inspector.rb
|
101
119
|
- lib/interpolator.rb
|
102
120
|
- lib/key.rb
|
103
121
|
- lib/parser.rb
|
@@ -129,6 +147,7 @@ files:
|
|
129
147
|
- test/snaps/TW_SingleFrameExtrapolated_from2011.timewarp
|
130
148
|
- test/snaps/TW_TEST.F_Kronos
|
131
149
|
- test/snaps/timewarp_where_interp_fails_at_end.timewarp
|
150
|
+
- test/stabilizer_examples/2014_cornerpin_points.stabilizer
|
132
151
|
- test/test_bake_flame_channel_binary.rb
|
133
152
|
- test/test_base_timewarp_writer.rb
|
134
153
|
- test/test_batch_timewarp_writer.rb
|
@@ -138,6 +157,9 @@ files:
|
|
138
157
|
- test/test_extractor.rb
|
139
158
|
- test/test_flame_builder.rb
|
140
159
|
- test/test_flame_channel_parser.rb
|
160
|
+
- test/test_inspector.rb
|
161
|
+
- test/test_inspector_ref_output_stabilizer.txt
|
162
|
+
- test/test_inspector_ref_output_timewarp.txt
|
141
163
|
- test/test_interpolator.rb
|
142
164
|
- test/test_key.rb
|
143
165
|
- test/test_kronos_timewarp_writer.rb
|
@@ -159,25 +181,24 @@ files:
|
|
159
181
|
homepage: http://guerilla-di.org/flame-channel-parser/
|
160
182
|
licenses:
|
161
183
|
- MIT
|
184
|
+
metadata: {}
|
162
185
|
post_install_message:
|
163
186
|
rdoc_options: []
|
164
187
|
require_paths:
|
165
188
|
- lib
|
166
189
|
required_ruby_version: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
190
|
requirements:
|
169
|
-
- -
|
191
|
+
- - ">="
|
170
192
|
- !ruby/object:Gem::Version
|
171
193
|
version: '0'
|
172
194
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
|
-
none: false
|
174
195
|
requirements:
|
175
|
-
- -
|
196
|
+
- - ">="
|
176
197
|
- !ruby/object:Gem::Version
|
177
198
|
version: '0'
|
178
199
|
requirements: []
|
179
200
|
rubyforge_project:
|
180
|
-
rubygems_version:
|
201
|
+
rubygems_version: 2.7.6
|
181
202
|
signing_key:
|
182
203
|
specification_version: 3
|
183
204
|
summary: A parser/interpolator for Flame/Smoke animation curves
|