flame_channel_parser 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/bin/bake_flame_channel +5 -11
- data/flame_channel_parser.gemspec +3 -2
- data/lib/flame_channel_parser.rb +1 -1
- data/lib/timewarp_extractor.rb +1 -1
- data/test/{test_cli.rb → test_bake_flame_channel_binary.rb} +2 -2
- data/test/test_timewarp_extractor.rb +8 -0
- data/test/timewarp_examples/tw_batch_out.framecurve.txt +104 -0
- metadata +13 -12
data/History.txt
CHANGED
data/bin/bake_flame_channel
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
#
|
6
6
|
# == Usage
|
7
7
|
#
|
8
|
-
# bake_flame_channel
|
8
|
+
# bake_flame_channel --channel Timing/Timing -e 123 /usr/discreet/projects/Luxury/timewarp/shot2_tw.timewarp > /mnt/3d/curves/shot2_tw.txt
|
9
9
|
#
|
10
10
|
# == Author
|
11
11
|
# Julik <me@julik.nl>
|
@@ -18,7 +18,7 @@ require "update_hints"
|
|
18
18
|
options = {:destination => $stdout}
|
19
19
|
|
20
20
|
op = OptionParser.new
|
21
|
-
op.banner = "Usage: bake_flame_channel --channel Timing/Timing -e 123 /usr/discreet/projects/Luxury/timewarp/shot2_tw.timewarp > /mnt/3d/curves/shot2_tw.
|
21
|
+
op.banner = "Usage: bake_flame_channel --channel Timing/Timing -e 123 /usr/discreet/projects/Luxury/timewarp/shot2_tw.timewarp > /mnt/3d/curves/shot2_tw.txt\n" +
|
22
22
|
"The output file can be used as Time+Value ASCII input for Nuke " +
|
23
23
|
"or parsed with any simple script"
|
24
24
|
op.on(" -c", "--channel CHANNEL_NAME", String,
|
@@ -40,15 +40,9 @@ op.on(" -f", "--to-file FILENAME", String,
|
|
40
40
|
|
41
41
|
op.parse!
|
42
42
|
setup_path = ARGV.shift
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
unless File.exist?(setup_path)
|
49
|
-
$stderr.puts "File does not exist."
|
50
|
-
exit -1
|
51
|
-
end
|
43
|
+
|
44
|
+
fail "No input file path provided. Please see bake_flame_channel --help for usage information." unless setup_path
|
45
|
+
fail "File does not exist." unless File.exist?(setup_path)
|
52
46
|
|
53
47
|
FlameChannelParser::Extractor.extract(setup_path, options)
|
54
48
|
options[:destination].close if options[:destination].respond_to?(:close)
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "flame_channel_parser"
|
8
|
-
s.version = "4.0.
|
8
|
+
s.version = "4.0.2"
|
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"]
|
@@ -70,10 +70,10 @@ Gem::Specification.new do |s|
|
|
70
70
|
"test/snaps/TW_SingleFrameExtrapolated_from2011.timewarp",
|
71
71
|
"test/snaps/TW_TEST.F_Kronos",
|
72
72
|
"test/snaps/timewarp_where_interp_fails_at_end.timewarp",
|
73
|
+
"test/test_bake_flame_channel_binary.rb",
|
73
74
|
"test/test_base_timewarp_writer.rb",
|
74
75
|
"test/test_batch_timewarp_writer.rb",
|
75
76
|
"test/test_channel.rb",
|
76
|
-
"test/test_cli.rb",
|
77
77
|
"test/test_cli_framecurve_to_flame.rb",
|
78
78
|
"test/test_cli_timewarp_extractor.rb",
|
79
79
|
"test/test_extractor.rb",
|
@@ -93,6 +93,7 @@ Gem::Specification.new do |s|
|
|
93
93
|
"test/timewarp_examples/TW_TEST.F_Kronos",
|
94
94
|
"test/timewarp_examples/output.txt",
|
95
95
|
"test/timewarp_examples/simple.framecurve.txt",
|
96
|
+
"test/timewarp_examples/tw_batch_out.framecurve.txt",
|
96
97
|
"test/timewarp_export_samples/BatchTW.timewarp_node",
|
97
98
|
"test/timewarp_export_samples/Kronos.F_Kronos",
|
98
99
|
"test/timewarp_export_samples/SoftFX.timewarp"
|
data/lib/flame_channel_parser.rb
CHANGED
data/lib/timewarp_extractor.rb
CHANGED
@@ -10,14 +10,14 @@ class TestCli < Test::Unit::TestCase
|
|
10
10
|
|
11
11
|
def test_cli_with_no_args_produces_usage
|
12
12
|
status, o, e = @app.run('')
|
13
|
-
assert_equal
|
13
|
+
assert_equal 1, status
|
14
14
|
assert_match /No input file path provided/, e
|
15
15
|
assert_match /--help for usage information/, e
|
16
16
|
end
|
17
17
|
|
18
18
|
def test_cli_with_nonexisting_file
|
19
19
|
status, o, e = @app.run(" amazing.action")
|
20
|
-
assert_equal
|
20
|
+
assert_equal 1, status
|
21
21
|
assert_match /does not exist/, e
|
22
22
|
end
|
23
23
|
|
@@ -16,6 +16,14 @@ class TestTwextract < Test::Unit::TestCase
|
|
16
16
|
assert_same_output(baked_io, interpolated_io)
|
17
17
|
end
|
18
18
|
|
19
|
+
def test_parse_batch_tw_setup
|
20
|
+
interpolated_io = StringIO.new
|
21
|
+
baked_io = File.open(File.dirname(__FILE__) + "/timewarp_examples/tw_batch_out.framecurve.txt")
|
22
|
+
|
23
|
+
FlameChannelParser::TimewarpExtractor.new.extract(File.dirname(__FILE__) + "/snaps/BatchTimewarp_ext1.timewarp_node", :destination => interpolated_io)
|
24
|
+
assert_same_output(baked_io, interpolated_io)
|
25
|
+
end
|
26
|
+
|
19
27
|
private
|
20
28
|
|
21
29
|
D = 0.1
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# http://framecurve.org/specification-v1
|
2
|
+
# at_frame use_frame_of_source
|
3
|
+
1 1.00000
|
4
|
+
2 2.04348
|
5
|
+
3 3.08696
|
6
|
+
4 4.13043
|
7
|
+
5 5.17391
|
8
|
+
6 6.21739
|
9
|
+
7 7.26087
|
10
|
+
8 8.30435
|
11
|
+
9 9.34783
|
12
|
+
10 10.39130
|
13
|
+
11 11.43478
|
14
|
+
12 12.47826
|
15
|
+
13 13.52174
|
16
|
+
14 14.56522
|
17
|
+
15 15.60870
|
18
|
+
16 16.65217
|
19
|
+
17 17.69565
|
20
|
+
18 18.73913
|
21
|
+
19 19.78261
|
22
|
+
20 20.82609
|
23
|
+
21 21.86957
|
24
|
+
22 22.91304
|
25
|
+
23 23.95652
|
26
|
+
24 25.00000
|
27
|
+
25 26.53846
|
28
|
+
26 28.07692
|
29
|
+
27 29.61538
|
30
|
+
28 31.15385
|
31
|
+
29 32.69231
|
32
|
+
30 34.23077
|
33
|
+
31 35.76923
|
34
|
+
32 37.30769
|
35
|
+
33 38.84615
|
36
|
+
34 40.38462
|
37
|
+
35 41.92308
|
38
|
+
36 43.46154
|
39
|
+
37 45.00000
|
40
|
+
38 46.53846
|
41
|
+
39 48.07692
|
42
|
+
40 49.61538
|
43
|
+
41 51.15385
|
44
|
+
42 52.69231
|
45
|
+
43 54.23077
|
46
|
+
44 55.76923
|
47
|
+
45 57.30769
|
48
|
+
46 58.84615
|
49
|
+
47 60.38462
|
50
|
+
48 61.92308
|
51
|
+
49 63.46154
|
52
|
+
50 65.00000
|
53
|
+
51 65.71154
|
54
|
+
52 66.42308
|
55
|
+
53 67.13462
|
56
|
+
54 67.84615
|
57
|
+
55 68.55769
|
58
|
+
56 69.26923
|
59
|
+
57 69.98077
|
60
|
+
58 70.69231
|
61
|
+
59 71.40385
|
62
|
+
60 72.11538
|
63
|
+
61 72.82692
|
64
|
+
62 73.53846
|
65
|
+
63 74.25000
|
66
|
+
64 74.96154
|
67
|
+
65 75.67308
|
68
|
+
66 76.38462
|
69
|
+
67 77.09615
|
70
|
+
68 77.80769
|
71
|
+
69 78.51923
|
72
|
+
70 79.23077
|
73
|
+
71 79.94231
|
74
|
+
72 80.65385
|
75
|
+
73 81.36538
|
76
|
+
74 82.07692
|
77
|
+
75 82.78846
|
78
|
+
76 83.50000
|
79
|
+
77 84.21154
|
80
|
+
78 84.92308
|
81
|
+
79 85.63462
|
82
|
+
80 86.34615
|
83
|
+
81 87.05769
|
84
|
+
82 87.76923
|
85
|
+
83 88.48077
|
86
|
+
84 89.19231
|
87
|
+
85 89.90385
|
88
|
+
86 90.61538
|
89
|
+
87 91.32692
|
90
|
+
88 92.03846
|
91
|
+
89 92.75000
|
92
|
+
90 93.46154
|
93
|
+
91 94.17308
|
94
|
+
92 94.88462
|
95
|
+
93 95.59615
|
96
|
+
94 96.30769
|
97
|
+
95 97.01923
|
98
|
+
96 97.73077
|
99
|
+
97 98.44231
|
100
|
+
98 99.15385
|
101
|
+
99 99.86538
|
102
|
+
100 100.57692
|
103
|
+
101 101.28846
|
104
|
+
102 102.00000
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame_channel_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-12-30 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: update_hints
|
16
|
-
requirement: &
|
16
|
+
requirement: &10803030 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '1.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *10803030
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: framecurve
|
27
|
-
requirement: &
|
27
|
+
requirement: &10802730 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *10802730
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: jeweler
|
38
|
-
requirement: &
|
38
|
+
requirement: &10802450 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *10802450
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rake
|
49
|
-
requirement: &
|
49
|
+
requirement: &10802170 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *10802170
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: cli_test
|
60
|
-
requirement: &
|
60
|
+
requirement: &10801880 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,7 +65,7 @@ dependencies:
|
|
65
65
|
version: '1.0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *10801880
|
69
69
|
description: Reads and interpolates animation channels in IFFS setups
|
70
70
|
email: me@julik.nl
|
71
71
|
executables:
|
@@ -129,10 +129,10 @@ files:
|
|
129
129
|
- test/snaps/TW_SingleFrameExtrapolated_from2011.timewarp
|
130
130
|
- test/snaps/TW_TEST.F_Kronos
|
131
131
|
- test/snaps/timewarp_where_interp_fails_at_end.timewarp
|
132
|
+
- test/test_bake_flame_channel_binary.rb
|
132
133
|
- test/test_base_timewarp_writer.rb
|
133
134
|
- test/test_batch_timewarp_writer.rb
|
134
135
|
- test/test_channel.rb
|
135
|
-
- test/test_cli.rb
|
136
136
|
- test/test_cli_framecurve_to_flame.rb
|
137
137
|
- test/test_cli_timewarp_extractor.rb
|
138
138
|
- test/test_extractor.rb
|
@@ -152,6 +152,7 @@ files:
|
|
152
152
|
- test/timewarp_examples/TW_TEST.F_Kronos
|
153
153
|
- test/timewarp_examples/output.txt
|
154
154
|
- test/timewarp_examples/simple.framecurve.txt
|
155
|
+
- test/timewarp_examples/tw_batch_out.framecurve.txt
|
155
156
|
- test/timewarp_export_samples/BatchTW.timewarp_node
|
156
157
|
- test/timewarp_export_samples/Kronos.F_Kronos
|
157
158
|
- test/timewarp_export_samples/SoftFX.timewarp
|