flame_channel_parser 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,7 @@
1
+ === 4.0.1 / 2011-09-11
2
+
3
+ * Minor fixes
4
+
1
5
  === 4.0.0 / 2011-09-11
2
6
 
3
7
  * Integrate the Framecurve library. Parse TO framecurve as well as FROM to all supported timewarpers
@@ -6,27 +6,20 @@ require "update_hints"
6
6
  options = {:destination => $stdout }
7
7
  op = OptionParser.new
8
8
 
9
- op.banner = "Usage: bake_flame_timewarp /usr/discreet/projects/ExpensiveDildo/timewarp/shot2_tw.timewarp > /mnt/3d/curves/shot2_tw.framecurve.txt"
9
+ op.banner = "Usage: framecurve_from_flame /usr/discreet/projects/BoringBeautySpot/timewarp/shot2_tw.timewarp"
10
10
  op.on(" -s", "--startframe FRAME",
11
- Integer, "Bake the time curve from this specific frame (defaults to the end of the setup"
11
+ Integer, "Bake the time curve upto this specific frame (defaults to the end of the setup"
12
12
  ) {|from| options[:start_frame] = from }
13
13
  op.on(" -e", "--endframe FRAME",
14
- Integer, "Bake the time curve upto this specific frame (defaults to frame 1)"
14
+ Integer, "Bake the time curve from this specific frame (defaults to frame 1)"
15
15
  ) {|upto| options[:end_frame] = upto }
16
16
 
17
17
  op.parse!
18
18
 
19
19
  setup_path = ARGV.shift
20
20
 
21
- unless setup_path
22
- $stderr.puts "No input file path provided. Please see flametwextract --help for usage information."
23
- exit -1
24
- end
25
-
26
- unless File.exist?(setup_path)
27
- $stderr.puts "File does not exist."
28
- exit -1
29
- end
21
+ fail "No input file path provided. Use --help for usage information." unless setup_path
22
+ fail "File does not exist" unless File.exist?(setup_path)
30
23
 
31
24
  # Setup the destination
32
25
  destination_path = setup_path.gsub(/\.(\w+)$/, '.framecurve.txt')
@@ -12,6 +12,14 @@ fail("No input file path provided.") unless fc_path
12
12
  fail("File %s does not exist." % fc_path) unless File.exist?(fc_path)
13
13
 
14
14
  curve = Framecurve::Parser.new.parse(fc_path)
15
+ v = Framecurve::Validator.new
16
+ v.validate(curve)
17
+ if v.any_errors?
18
+ v.errors.each do | error |
19
+ $stderr.puts "Framecurve file was faulty: #{error}"
20
+ end
21
+ end
22
+
15
23
  FlameChannelParser::FramecurveWriters::Base.with_each_writer do | writer_class |
16
24
  filename = [fc_path, writer_class.extension].join
17
25
  File.open(filename, "wb") do | f |
@@ -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.0"
8
+ s.version = "4.0.1"
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"]
@@ -1,5 +1,5 @@
1
1
  module FlameChannelParser
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
 
4
4
  module FramecurveWriters; end
5
5
 
@@ -20,14 +20,14 @@ class TestCliTimewarpExtractor < Test::Unit::TestCase
20
20
 
21
21
  def test_cli_with_no_args_produces_usage
22
22
  status, o, e = cli('')
23
- assert_equal( -1, status)
23
+ assert_equal( 1, status)
24
24
  assert_match( /No input file path provided/, e)
25
25
  assert_match( /--help for usage information/, e)
26
26
  end
27
27
 
28
28
  def test_cli_with_nonexisting_file
29
29
  status, o, e = cli(" amazing.action")
30
- assert_equal( -1, status)
30
+ assert_equal( 1, status)
31
31
  assert_match /does not exist/, e
32
32
  end
33
33
 
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.0
4
+ version: 4.0.1
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: &10778380 !ruby/object:Gem::Requirement
16
+ requirement: &10740070 !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: *10778380
24
+ version_requirements: *10740070
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: framecurve
27
- requirement: &10778120 !ruby/object:Gem::Requirement
27
+ requirement: &10739830 !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: *10778120
35
+ version_requirements: *10739830
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: jeweler
38
- requirement: &10777770 !ruby/object:Gem::Requirement
38
+ requirement: &10739570 !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: *10777770
46
+ version_requirements: *10739570
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rake
49
- requirement: &10777390 !ruby/object:Gem::Requirement
49
+ requirement: &10739250 !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: *10777390
57
+ version_requirements: *10739250
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: cli_test
60
- requirement: &10777080 !ruby/object:Gem::Requirement
60
+ requirement: &10738930 !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: *10777080
68
+ version_requirements: *10738930
69
69
  description: Reads and interpolates animation channels in IFFS setups
70
70
  email: me@julik.nl
71
71
  executables: