tracksperanto 1.9.3 → 1.9.4

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
+ === 1.9.4 / 2010-04-16
2
+
3
+ * Fix the boujou exporter to not crash boujou 5
4
+
1
5
  === 1.9.3 / 2010-04-15
2
6
 
3
7
  * Add direct export to boujou feature tracks
data/lib/export/boujou.rb CHANGED
@@ -10,10 +10,12 @@ class Tracksperanto::Export::Boujou < Tracksperanto::Export::Base
10
10
  end
11
11
 
12
12
  DATETIME_FORMAT = '%a %b %d %H:%M:%S %Y'
13
- PREAMBLE = "#boujou 2d tracks export: text\n# boujou version: 4.1.0 28444\n" +
14
- "#Creation date : %s\n# track_id view x y"
15
-
16
- TEMPLATE = "%s %d %.3f %.3f"
13
+ PREAMBLE = %[# boujou 2d tracks export: text
14
+ # boujou version: 4.1.0 28444
15
+ # Creation date : %s
16
+ #
17
+ # track_id view x y]
18
+ POINT_T = "%s %d %.3f %.3f"
17
19
 
18
20
  def start_export( img_width, img_height)
19
21
  @height = img_height
@@ -26,6 +28,6 @@ class Tracksperanto::Export::Boujou < Tracksperanto::Export::Base
26
28
 
27
29
  def export_point(frame, abs_float_x, abs_float_y, float_residual)
28
30
  height_inv = @height - abs_float_y
29
- @io.write(TEMPLATE % [@tracker_name, frame + 1, abs_float_x, height_inv])
31
+ @io.puts(POINT_T % [@tracker_name, frame + 1, abs_float_x, height_inv])
30
32
  end
31
33
  end
data/lib/tracksperanto.rb CHANGED
@@ -4,7 +4,7 @@ require 'tempfile'
4
4
 
5
5
  module Tracksperanto
6
6
  PATH = File.expand_path(File.dirname(__FILE__))
7
- VERSION = '1.9.3'
7
+ VERSION = '1.9.4'
8
8
 
9
9
  module Import; end
10
10
  module Export; end
@@ -1,5 +1,43 @@
1
- #boujou 2d tracks export: text
2
- # boujou version: 4.1.0 28444
3
- #Creation date : Thu Apr 15 17:21:26 2010
4
- # track_id view x y
5
- Parabolic_1_from_top_left 1 0.000 0.000Parabolic_1_from_top_left 2 96.000 205.200Parabolic_1_from_top_left 3 192.000 388.800Parabolic_1_from_top_left 4 288.000 550.800Parabolic_1_from_top_left 5 384.000 691.200Parabolic_1_from_top_left 6 480.000 810.000Parabolic_1_from_top_left 7 576.000 907.200Parabolic_1_from_top_left 8 672.000 982.800Parabolic_1_from_top_left 9 768.000 1036.800Parabolic_1_from_top_left 10 864.000 1069.200Parabolic_1_from_top_left 13 1152.000 1036.800Parabolic_1_from_top_left 14 1248.000 982.800Parabolic_1_from_top_left 15 1344.000 907.200Parabolic_1_from_top_left 16 1440.000 810.000Parabolic_1_from_top_left 17 1536.000 691.200Parabolic_1_from_top_left 18 1632.000 550.800Parabolic_1_from_top_left 19 1728.000 388.800Parabolic_1_from_top_left 20 1824.000 205.200Parabolic_1_from_top_left 21 1920.000 0.000Parabolic_2_from_bottom_right 1 1920.000 1080.000Parabolic_2_from_bottom_right 2 1824.000 874.800Parabolic_2_from_bottom_right 3 1728.000 691.200Parabolic_2_from_bottom_right 4 1632.000 529.200Parabolic_2_from_bottom_right 5 1536.000 388.800Parabolic_2_from_bottom_right 6 1440.000 270.000Parabolic_2_from_bottom_right 7 1344.000 172.800Parabolic_2_from_bottom_right 8 1248.000 97.200Parabolic_2_from_bottom_right 9 1152.000 43.200Parabolic_2_from_bottom_right 10 1056.000 10.800Parabolic_2_from_bottom_right 13 768.000 43.200Parabolic_2_from_bottom_right 14 672.000 97.200Parabolic_2_from_bottom_right 15 576.000 172.800Parabolic_2_from_bottom_right 16 480.000 270.000Parabolic_2_from_bottom_right 17 384.000 388.800Parabolic_2_from_bottom_right 18 288.000 529.200Parabolic_2_from_bottom_right 19 192.000 691.200Parabolic_2_from_bottom_right 20 96.000 874.800Parabolic_2_from_bottom_right 21 0.000 1080.000
1
+ # boujou 2d tracks export: text
2
+ # boujou version: 4.1.0 28444
3
+ # Creation date : Thu Apr 15 17:21:26 2010
4
+ #
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
data/test/test_cli.rb CHANGED
@@ -23,9 +23,8 @@ class CliTest < Test::Unit::TestCase
23
23
  $VERBOSE = false
24
24
  load(BIN_P)
25
25
  return [0, os.string, es.string]
26
- rescue Exception => boom # The binary uses exit(), we use that to preserve the output code
27
- return [boom.status, os.string, es.string] if boom.is_a?(SystemExit)
28
- raise boom
26
+ rescue SystemExit => boom # The binary uses exit(), we use that to preserve the output code
27
+ return [boom.status, os.string, es.string]
29
28
  ensure
30
29
  $VERBOSE = verbosity
31
30
  ARGV.replace(old_argv)
@@ -5,6 +5,7 @@ class PipelineTest < Test::Unit::TestCase
5
5
  def setup
6
6
  @old_dir = Dir.pwd
7
7
  Dir.chdir(File.dirname(__FILE__))
8
+ super
8
9
  end
9
10
 
10
11
  def create_stabilizer_file
@@ -26,6 +27,7 @@ class PipelineTest < Test::Unit::TestCase
26
27
  def teardown
27
28
  Dir.glob("./input*.*").each(&File.method(:unlink))
28
29
  Dir.chdir(@old_dir)
30
+ super
29
31
  end
30
32
 
31
33
  def test_supports_block_init
@@ -41,6 +43,25 @@ class PipelineTest < Test::Unit::TestCase
41
43
  assert_equal 9, pipeline.converted_keyframes, "Should report conversion of 9 keyframes"
42
44
  end
43
45
 
46
+ def test_middleware_initialization_from_tuples
47
+ create_stabilizer_file
48
+
49
+ pipeline = Tracksperanto::Pipeline::Base.new
50
+ pipeline.middleware_tuples = [
51
+ ["Bla", {:foo=> 234}]
52
+ ]
53
+
54
+ mock_mux = flexmock("MUX")
55
+ flexmock(Tracksperanto::Export::Mux).should_receive(:new).and_return(mock_mux)
56
+ m = flexmock("middleware object")
57
+ mock_middleware_class = flexmock("middleware class")
58
+
59
+ flexmock(Tracksperanto).should_receive(:get_middleware).with("Bla").once.and_return(mock_middleware_class)
60
+ mock_middleware_class.should_receive(:new).with(mock_mux, {:foo => 234}).once
61
+
62
+ assert_raise(NoMethodError) { pipeline.run(@stabilizer) }
63
+ end
64
+
44
65
  def test_run_with_autodetected_importer_that_requires_size
45
66
  FileUtils.cp("./import/samples/shake_script/four_tracks_in_one_stabilizer.shk", "./input.shk")
46
67
  pipeline = Tracksperanto::Pipeline::Base.new
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: 1.9.3
4
+ version: 1.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-15 00:00:00 +02:00
12
+ date: 2010-04-16 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency